LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Cron (https://www.linuxquestions.org/questions/slackware-14/cron-897474/)

scam 08-15-2011 03:47 PM

Cron
 
Hi, I was wondering if cron is worth while using if my pc isn't running 24/7 or times I can't guarantee when a cron job will run. I was thinking of slackpkg update/upgrade or syncing time ect...or would it be better creating a bash script to do this? Just wondered if anyone in my position uses crond.

koenigdavidmj 08-15-2011 04:50 PM

Generally it is considered a bad idea to let package upgrades happen as they may break your system without notice. If you upgrade the system manually and the package breaks, then you are at least there to clean it up right away.

Also, the `anacron' tool is built for the use case that you are describing. SlackBuild is here.

Woodsman 08-15-2011 06:53 PM

Generally my primary office computer is powered on when my cron jobs are scheduled to run during the day. Long ago I tried anacron and now no longer remember what I disliked. To resolve the problem of missed cron jobs, way back then I wrote my own shell script that runs when I boot the computer. Basically, if I boot in the evening for the first boot of the day the script runs the cron jobs that should have run that day. If I skip any day and boot normally the next morning, then the script exits and my system runs all cron jobs as normally scheduled that day.

Missing a cron job is not the end of the world for me and my shell script suffices. :)

For synchronizing time I run the ntp daemon only on my primary office machine. All other systems in the house use the primary office machine as a time source.

I never run any package updating in automated mode. Twice I have been burned by updating too soon and the released package contained unintentional bugs that required me to reinstall the previous version. Granted, that rarely happens, but generally package updates are not something that is needed right now or the world stops spinning. Unless many people around the web are screaming about a new-found vulnerability, I am content to wait a few days or so to update packages for security reasons. Usually I perform security patch updates on the weekend. I subscribe to the Slackware security list and am notified when a package has been updated for security reasons.


All times are GMT -5. The time now is 03:15 AM.