Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
When exactly does cron run??
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Penguin of Wonder
Apprentice
Apprentice


Joined: 17 Jan 2006
Posts: 280
Location: West Virginia

PostPosted: Wed Oct 18, 2006 1:49 am    Post subject: When exactly does cron run?? Reply with quote

Using the ever so wonderful Gentoo Wiki I setup cron to run three tasks on my computer. Sync portage, updatedb, and archive my logs. All of these are setup using a my_job.weekly instead of just editing my crontab. So my question then is what day of the week do they run? Does cron, in my case vixie cron, just randomly pick a day or there is a set time it runs every week?
_________________
My Linux Blog

AMD64 3700+
2G DDR 3200 Ram
320G HDD
Back to top
View user's profile Send private message
Dlareh
Advocate
Advocate


Joined: 06 Aug 2005
Posts: 2102

PostPosted: Wed Oct 18, 2006 2:07 am    Post subject: Reply with quote

Here's a fun experiment, go to that directory and make a new job:
Code:
echo 'date >> $HOME/cron.log' >> log.weekly

Then check back a week later:P
_________________
"Mr Thomas Edison has been up on the two previous nights discovering 'a bug' in his phonograph." --Pall Mall Gazette (1889)
Are we THERE yet?
Back to top
View user's profile Send private message
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2588
Location: Near Toronto

PostPosted: Wed Oct 18, 2006 2:11 am    Post subject: Reply with quote

Probably I'm not understanding your question quite right. But I
find the cron.weekly listed in /etc/crontab like this:

Code:
15 4  * * 6     root    rm -f /var/spool/cron/lastrun/cron.weekly


Sorry if this is irrelevant
Back to top
View user's profile Send private message
Penguin of Wonder
Apprentice
Apprentice


Joined: 17 Jan 2006
Posts: 280
Location: West Virginia

PostPosted: Wed Oct 18, 2006 3:15 am    Post subject: Reply with quote

Dlareh wrote:
Here's a fun experiment, go to that directory and make a new job:
Code:
echo 'date >> $HOME/cron.log' >> log.weekly

Then check back a week later:P


Funny that you would say that. I have conky on system setup to tell me the last time I synced portage. So tried exactly what you said, except with Portage instead of just writting to a log. My assumption would of been that cron would sync a week from the last time I had synced, but that was not the case. In fact, 8 days after my last sync it still claimed I hadn't synced. I guess it would of only been 5 or 6 days since I created the job though. Would that be the reason why it didn't appear to work?

On a side note, my logs to be appear to be archiving themselves without me. So something must be working correctly.
_________________
My Linux Blog

AMD64 3700+
2G DDR 3200 Ram
320G HDD
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum