LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   what is cron schedule (https://www.linuxquestions.org/questions/linux-newbie-8/what-is-cron-schedule-604709/)

coldbeerz 12-05-2007 11:06 AM

what is cron schedule
 
How do I find out what crons I have and when they are running?
What day of the week is the cron scheduled to run to write the names of files with .bak extensions to a logfile?

colucix 12-05-2007 11:13 AM

If /var is mounted on its own partition you can use df, otherwise du. It's me or is the title of this thread not related with your question?

forrestt 12-05-2007 12:46 PM

To see the list of cronjobs and when they are scheduled run the command "crontab -l". The fields are:

Min, Hour, Day of Month, Month, Day of Week, Command. Most of the fields are combined with AND, however the Day of Month and Day of Week fields are combined with OR. So if you have something like:

Code:

00 0 1-7 * 5 echo "First Friday of the Month"
It WILL NOT just echo on the first Friday of the month, it will echo EVERY Friday and everyday of the month from the first through the seventh.

It is basically saying:

if ((MIN == 00) && (HOUR == 0) && (MONTH is any) && ((DOM < 7) || (DOW == 5))) run the command.

As far as when certain things are run on YOUR system, I'd have to see the output of "crontab -l" to know.

HTH

Forrest

colucix 12-05-2007 12:58 PM

Quote:

Originally Posted by colucix (Post 2981106)
If /var is mounted on its own partition you can use df, otherwise du. It's me or is the title of this thread not related with your question?

Quoting myself just to tell I was not drunk when I gave the answer: I swear that was another question here! :D

coldbeerz 12-05-2007 03:21 PM

Thanks for the help!
 
This newbie learned another command. I used the crontab -1 command and found the cron I was looking for.

coldbeerz 12-05-2007 03:24 PM

You may have been drunk
 
Quote:

Originally Posted by colucix (Post 2981221)
Quoting myself just to tell I was not drunk when I gave the answer: I swear that was another question here! :D

But I did change the post. You must have replied to my post as soon as it went up. I put the wrong question up for a second.
If you are drunk -- I am jealous.


All times are GMT -5. The time now is 01:49 AM.