How to know if crontab implements @reboot?
according to crontab.guru, many functions like @reboot, @daily, @annually ... are not standard. Is there any way to know the one implemented on my system (Kubuntu 21.04) ? I have tried the man-page, but have no result.
Thank you
The supported "special strings" for time specification are listed in man 5 crontab
:
Instead of the first five fields, one of eight special strings may ap‐ pear: string meaning ------ ------- @reboot Run once, at startup. @yearly Run once a year, "0 0 1 1 *". @annually (same as @yearly) @monthly Run once a month, "0 0 1 * *". @weekly Run once a week, "0 0 * * 0". @daily Run once a day, "0 0 * * *". @midnight (same as @daily) @hourly Run once an hour, "0 * * * *". Please note that startup, as far as @reboot is concerned, is the time when the cron(8) daemon startup. In particular, it may be before some system daemons, or other facilities, were startup. This is due to the boot order sequence of the machine.
If you don't believe the documentation for your system, then you may download the source (ex. apt-get source cron
) and check the entry.c
file:
cron-3.0pl1$ grep '!strcmp' entry.c
if (!strcmp("reboot", cmd)) {
} else if (!strcmp("yearly", cmd) || !strcmp("annually", cmd)){
} else if (!strcmp("monthly", cmd)) {
} else if (!strcmp("weekly", cmd)) {
} else if (!strcmp("daily", cmd) || !strcmp("midnight", cmd)) {
} else if (!strcmp("hourly", cmd)) {