I need to run a job at this cron
schedule, but it seems like I can't express this in one statement. Is there a way to get this in one cron
statement?
8am Mon-Sat
2pm Sun
Thanks.
It is a wildcard for every part of the cron schedule expression. So * * * * * means every minute of every hour of every day of every month and every day of the week .
We can create that cron jobs by using crontab and list them using the crontab -l command. While creating, we can specify the date and time-related fields for the week or optionally a string that is provided of @weekly in the command for creating a cron weekly job.
In general, if you want to execute something on Sunday, just make sure the 5th column contains either of 0 , 7 or Sun . You had 6 , so it was running on Saturday. You can always use crontab. guru as a editor to check your cron expressions.
Meaning of cron expression 0 * * * * *? I think it means the scheduler is expected to run every seconds.
You're right. I'm afraid this is not possible. You'll need to specify two CRON expressions.
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