Function __global->schedule_code
Definitions
sources/calendar2.php
- Create a calendar event containing a Commandr command to execute a scheduled task.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: int
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $hook | ID_TEXT | No | No | required parameter | N/A | N/A | Hook to run under systems/commandr_scheduled |
| $id | string | No | No | required parameter | N/A | N/A | Unspecified identifier for the resource behind this scheduled event, for future querying to find said event; also passed to the Commandr hook |
| $parameters | array | No | No | required parameter | N/A | N/A | Array of parameters to pass through the Commandr command to the hook |
| $title | string | No | No | required parameter | N/A | N/A | Title of the calendar event to create |
| $start_year | integer | No | No | required parameter | N/A | N/A | Year which to execute the task |
| $start_month | integer | No | No | required parameter | N/A | N/A | Month which to execute the task |
| $start_day | integer | No | No | required parameter | N/A | N/A | Day of the month which to execute the task |
| $start_hour | integer | No | No | required parameter | N/A | N/A | Hour of the day which to execute the task |
| $start_minute | integer | No | No | required parameter | N/A | N/A | Minut of the hour which to execute the task |
Returns
- The ID of the event that was created
- Type: AUTO_LINK
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Create a calendar event containing a Commandr command to execute a scheduled task.
*
* @param ID_TEXT $hook Hook to run under systems/commandr_scheduled
* @param string $id Unspecified identifier for the resource behind this scheduled event, for future querying to find said event; also passed to the Commandr hook
* @param array $parameters Array of parameters to pass through the Commandr command to the hook
* @param string $title Title of the calendar event to create
* @param integer $start_year Year which to execute the task
* @param integer $start_month Month which to execute the task
* @param integer $start_day Day of the month which to execute the task
* @param integer $start_hour Hour of the day which to execute the task
* @param integer $start_minute Minut of the hour which to execute the task
* @return AUTO_LINK The ID of the event that was created
*/
function schedule_code(string $hook, string $id, array $parameters, string $title, int $start_year, int $start_month, int $start_day, int $start_hour, int $start_minute) : int
* Create a calendar event containing a Commandr command to execute a scheduled task.
*
* @param ID_TEXT $hook Hook to run under systems/commandr_scheduled
* @param string $id Unspecified identifier for the resource behind this scheduled event, for future querying to find said event; also passed to the Commandr hook
* @param array $parameters Array of parameters to pass through the Commandr command to the hook
* @param string $title Title of the calendar event to create
* @param integer $start_year Year which to execute the task
* @param integer $start_month Month which to execute the task
* @param integer $start_day Day of the month which to execute the task
* @param integer $start_hour Hour of the day which to execute the task
* @param integer $start_minute Minut of the hour which to execute the task
* @return AUTO_LINK The ID of the event that was created
*/
function schedule_code(string $hook, string $id, array $parameters, string $title, int $start_year, int $start_month, int $start_day, int $start_hour, int $start_minute) : int

