namespace \webfiori\framework\cron
abstract class AbstractJob
Class Attributes Summary
Class Methods Summary
Class Attributes Details
Class Methods Details
Parameters:
Adds new execution argument. An execution argument is an argument that can be supplied to the job in case of force execute. They will appear in cron control panel. They also can be provided to the job when executing it throw CLI as 'arg-name="argVal". The argument name must follow the following rules:
- Must be non-empty string.
- Must not contain '#', '?', '&', '=' or space.
Parameters:
- string|JobArgument $nameOrObj The name of the argument. This also can be an object.
Parameters:
- array $argsArr An array that contains the names of the arguments. This also can be an associative array. The indices are arguments names and the values are argument options.
Schedules a job using specific cron expression. For more information on cron expressions, go to https://en.wikipedia.org/wiki/Cron#CRON_expression. Note that the method does not support year field. This means the expression will have only 5 fields. Notes about the expression:
- Step values are not supported for months.
- Step values are not supported for day of week.
- Step values are not supported for day of month.
Parameters:
- string $when A cron expression (such as '8 15 1'). Default is ' ' which means run the job every minute.
Parameters:
Parameters:
Parameters:
- boolean $force If set to true, the job will be forced to execute even if it is not job time. Default is false.
Parameters:
- string $name the name of execution argument.
Parameters:
- string $argName The name of the argument.
- minutes: Contains sub arrays which has info about the minutes at which the job will be executed.
- hours: Contains sub arrays which has info about the hours at which the job will be executed.
- days-of-month: Contains sub arrays which has info about the days of month at which the job will be executed.
- months: Contains sub arrays which has info about the months at which the job will be executed.
- days-of-week: Contains sub arrays which has info about the days of week at which the job will be executed.
Parameters:
- string $name The name of the argument that will be checked.
Parameters:
- int|string $monthNameOrNum Month number from 1 to 12 inclusive or 3 letters month name. Default is 'jan'.
- int $dayNum The number of day in the month starting from 1 up to 31 inclusive. Default is 1.
- string $time A time in the form 'hh:mm'. hh can have any value between 0 and 23 inclusive. mm can have any value between 0 and 59 inclusive. default is '00:00'.
Parameters:
- CronCommand $command
Parameters:
- string $desc Job description.
Parameters:
- string $name The name of the job.
Parameters: