Linode Forum Index Linode Forum
Linode Community Forums
 


cron every hour question.

Click here to go to the original topic

 
       Linode Forum Index -> General Discussion
Author Message
marcl



Joined: 10 Aug 2011
Posts: 12

Posted: Fri Nov 18, 2011 5:40 pm    Post subject: cron every hour question.  

EDIT>>> found this. Does everyone get these 17th minute of the hour cron entries.

"That's easy, the 17th minute one is just cron.hourly firing off. Even if it's empty (I just realized this), cron will still log in /var/log/auth.log even if there was nothing to do, because it still did fire off."

http://ubuntuforums.org/showthread.php?t=905193


I was looking in auth.log and noticed that cron has been doing something every hour but when I look at etc/cron/hourly there is nothing but a placeholder.

I installed cron-apt to do daily updates which runs as expected once per day.

Any ideas what is happening?

edit. in /etc/cron.d there is just 2 files .placeholder and cron-apt (which says to run once per day)

nothing in /var/spool/cron/crontabs

in /etc/cron.daily , there is listed

standard
passwd
ntp
mlocate
man-db
logrotate
exim4-base
dpkg
bsdmainutils
aptitude
apt.

I did install exim but nothing else .
Back to top  
Vance



Joined: 18 Jan 2009
Posts: 354

Posted: Fri Nov 18, 2011 11:32 pm    Post subject: Re: cron every hour question.  

On most Linux systems (including Ubuntu), cron uses run-parts to kick off hourly, daily, weekly, and monthly scripts. It simply looks at the directory it's given (/etc/cron.hourly in this case) and runs any* scripts in there. You can simply view these scripts to see what they do.

*Well, it won't run scripts that have anything other than letters, digits, underscores, or hyphens in their names.
Back to top  
marcl



Joined: 10 Aug 2011
Posts: 12

Posted: Sat Nov 19, 2011 5:38 pm    Post subject:  

There actually is nothing in the hourly directory nor anything that should run every hour in any other of the directories I mentioned.

Was the explanation that I found which I posted in my edit a reasonable explanation. i.e cron is checking if there are any hourly jobs to do at 17mins past the hour?
Back to top  
hoopycat



Joined: 30 Aug 2008
Posts: 1294
Location: Rochester, New York

Posted: Sat Nov 19, 2011 6:26 pm    Post subject:  

cron knows nothing about /etc/cron.hourly/ (or anything else); all it knows is that it needs to run run-parts every hour. And that's what it's doing. So yup, completely reasonable.
Back to top  
 
       Linode Forum Index -> General Discussion
Page 1 of 1