LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Weird Cron Entry (https://www.linuxquestions.org/questions/linux-newbie-8/weird-cron-entry-4175568303/)

anon3001 01-29-2016 08:07 AM

Weird Cron Entry
 
Hello,

I found a cron entry like this:

30 8 8-14 * */2 {something something date -eq 6} blahblahblah

My question is for the day of the week entry (last one). I thought it meant every Tuesday within the 8th and 14th of the month, but the guy I spoke to says that this executes the action biweekly every Saturday. I don't remember the whole syntax, but I do remember and entry saying -eq 6 (don't know if that denotes Saturday). He said the */2 means biweekly. Can anyone break this down for me? Thanks

MensaWater 01-29-2016 09:51 AM

It will be run based on each specification.

If you type "man 5 crontab" you should see it contains something similar to this:
Quote:

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 (ie, 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.
That means your 8-14 will be done each day from the 8th through the 14th and your */2 will be done every 2 days so day 2 (Tues), day 4 (Thu) and day 6 (Sat).


All times are GMT -5. The time now is 06:16 PM.