Recently, when we started whenever, we found that we can use the cron syntax to set scheduled tasks. So we studied the cron syntax.
Every '0 0 27-31 ** 'do command "Echo 'you can use raw cron syntax too'" endcron command, used to set periodically executed commands. Format # file format description # -- minute (0-59) # | -- hour (0-23) # | -- Day (1-31) # | -- month (1-12) # | -- week (0-7) (Sunday = 0 or 7) # | # *** executed command 1, * Symbol: 30 18 *** # Do Something indicates that the command is run at every day. * Indicates any value. In this example, the values of day, month, and week are not considered. If * in front: ** 5 ** # Do something, the task runs every minute from AM to AM. 2. values separated by commas: 0 0, 5, 10 ** # Do Something indicates that the command is run at 00:00 on the first, 1st, and 5th days of a month. 3, range: 0 0 ** 1-5 # Do something1-5 means to run the command ls from Monday to Friday at 00:00 every day. 4. If both days and weeks are specified, they are all running relationships. 0 0 10*1 # Do something run the command on the 10th day of each month and every Monday. 5. The slash */10 ***** # Do Something indicates that the command is run every 10 minutes. If it is 0-10/5, it indicates that it runs every 5 minutes within the first 10 minutes of each hour. * 10/2 *** # Do Something indicates that it runs every second at an interval of two hours starting from 10th hours every day. The cron syntax can only be accurate to minutes. It is very useful when used with whenever.
[Convert] cron syntax