problems with using RPM to install files in /etc/cron.d/

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,

We are having some strange (too us) issues with cron and are seeking enlightenment. I'll provide some background. 

We recently installed RHEL 4.U3 on a number of servers. We run a number of custom applications on these servers, many of which require cron jobs to be run. Previously these jobs were all run by the same user and the cron jobs for each application was manually added to this users crontab using 'crontab -e'. We thought we could remove this manual step in the installation of our applications by instead creating a file which contained all the cron entries and having the install process copy the file into the /etc/cron.d/ directory. Now, we chose to use RPM to package and install our applications and RPM preserves the modified date/time on all the files it installs. When crond is looking to see if there are new files in the /etc/cron.d/ directory, it appears that it is checking the modified date on the /etc/cron.d/ directory and then the modified date on each file contained therein. This is (arguably) as per the man page for crond. But this meant that crond was not picking up our 
 new cron entries as the file modified dates were in the past! The solution we have used for this is to 'touch' any new added files and the /etc/cron.d directory in the RPM's post-install script. This does not seem like a good solution too us. Is this common practice?

A second problem we have had is with cron "silently" not working. For various reason an entry might not run, incorrect syntax in the file, wrong file permissions or the like. We have found that if one file has an issue it can stop all the entries been run. We are unsure of a good way to monitor if cron is working as expected (beyond tailing the /var/logs/cron and watching intently). Is there a good way to get cron to verify all the files in /etc/cron.d/? What about getting a listing of all the current scheduled jobs? Other things we can do to improve the visibility of what crond is doing?

Cheers,
Trev
-----------------------------------------------------------------------
This email contains confidential information. If you have received this
email in error, please delete it immediately, and inform us of the mistake
by return email. Any form of reproduction, or further dissemination of
this email is strictly prohibited.
Also, note that the opinions expressed in this email are those of the 
author and are not necessarily those of the Fonterra Co-operative Group
Limited.
http://www.fonterra.com/
-----------------------------------------------------------------------

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux