Hi,
I am trying to run a mount task twice a month on Wednesdays.
I tried using the cron syntax 0 12 */2 * 3
, but it didn’t work.
Can someone assist with this? It seems the syntax might not be supported for my intended schedule.
Thanks
Hi,
I am trying to run a mount task twice a month on Wednesdays.
I tried using the cron syntax 0 12 */2 * 3
, but it didn’t work.
Can someone assist with this? It seems the syntax might not be supported for my intended schedule.
Thanks
According to Crontab.guru - The cron schedule expression generator, this means “At 12:00 on every 2nd day-of-month if it’s on Wednesday.”, which I tend to agree. So not “every second Wednesday”.
But also, where exactly are you trying to use that syntax?
I am trying to run task that will run on Wednesday every two weeks.
Yeah, I don’t think you can do that with a cron entry easily.
How about 0 12 7-13,21-27 * 3
?
This should run it on the Wednesday if it is in the second and forth 7 day period of a month so it should be twice a month.
Depending on the cron implementation, no:
Note: The day of a command’s execution can be specified by two fields — day of month, and day of week. If both fields are restricted (i.e., aren’t *), the command will be run when either field matches the current time. For example, “30 4 1,15 * 5” would cause a command to be run at 4:30 am on the 1st and 15th of each month, plus every Friday.
Source: crontab(5)
from Vixie Cron
Hi,
I manage to do it by 0 12 * * wed%2
I sow foreman implement fugit