As I have recently seen something like
*/1 * * * * ./script.py
I would like to know if it means the same as
* * * * * ./script.py
What does * mean in Cron? The asterisk * is used as a wildcard in Cron. * sets the execution of a task to any minute, hour, day, weekday, or month.
The UNIX cron format is used to specify time in the schedule parameter of the ADMIN_TASK_ADD and ADMIN_TASK_UPDATE procedures. The cron format has five time and date fields separated by at least one blank. There can be no blank within a field value.
A cron expression is a string consisting of six or seven subexpressions (fields) that describe individual details of the schedule. These fields, separated by white space, can contain any of the allowed values with various combinations of the allowed characters for that field.
hourly, cron. monthly, cron. weekly are self-explanatory, they contain scripts executed every hour, every month and every week of the year; crontab: a cron file written with cron syntax that instructs the cron service to run jobs located in the daily, hourly, monthly and weekly folders.
Yes, it does.
*/X
means: every X minutes
*
means: every minute
So all together */1
means exactly the same as *
.
From man cron
:
Step values can be used in conjunction with ranges. Following a range with /number specifies skips of the number's value through the range. For example,
0-23/2'' can be used in the hours field to specify command execution every other hour (the alternative in the V7 standard is
0,2,4,6,8,10,12,14,16,18,20,22'').Steps are also permitted after an asterisk, so if you want to say
every two hours'', just use
*/2''.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With