Conditions | 1 |
Paths | 1 |
Total Lines | 48 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
13 | public static function getHelp() { |
||
14 | return <<<HELP |
||
15 | General tag definition |
||
16 | <comment>[tag] [time] [options] [arguments]</comment> |
||
17 | |||
18 | Description: |
||
19 | |||
20 | <comment>tag</comment> - @crontab |
||
21 | |||
22 | <comment>time</comment> - time in cron format (required) |
||
23 | # ┌───────────── min (0 - 59) |
||
24 | # │ ┌────────────── hour (0 - 23) |
||
25 | # │ │ ┌─────────────── day of month (1 - 31) |
||
26 | # │ │ │ ┌──────────────── month (1 - 12) |
||
27 | # │ │ │ │ ┌───────────────── day of week (0 - 6) (0 to 6 are Sunday to Saturday) |
||
28 | # │ │ │ │ │ |
||
29 | # │ │ │ │ │ |
||
30 | # * * * * * |
||
31 | <comment> |
||
32 | There is one simple difference between system crontab and current time annotation. |
||
33 | If you want to run command every/(min|hour|day|month) you should ignore first asterisk. |
||
34 | For example: |
||
35 | - every 10 minutes : /10 * * * * |
||
36 | - every 20 minutes every 3 hours : /20 /3 * * * |
||
37 | </comment> |
||
38 | |||
39 | |||
40 | <comment>options</comment> - command options (optional) |
||
41 | <comment>arguments</comment> - command arguments (optional) |
||
42 | |||
43 | |||
44 | <comment>Some examples:</comment> |
||
45 | If you want to run commands on server just add @crontab tag to command |
||
46 | Run command at 07:45 every day |
||
47 | /** |
||
48 | * @crontab 45 07 * * * |
||
49 | */ |
||
50 | |||
51 | Some commands have arguments and options |
||
52 | Add options/arguments after time definition |
||
53 | |||
54 | /** |
||
55 | * @crontab 10 10 * * * --no-cache test |
||
56 | */ |
||
57 | |||
58 | HELP; |
||
59 | |||
60 | } |
||
61 | } |