SUSE / openSUSEThis Forum is for the discussion of Suse Linux.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I had a problem in that my cron.daily jobs were running a 23:30 (local time) every night. Which was annoying - as I was likely to be browsing, listening to music or playing a game at the time, and one of those jobs is the updatedb tool. This meant my music/game would stutter as the hard disk was thoroughly thrashed.
First I tried to see if there was documentation on configuring the run-crons system, and was slightly frustrated - googling had a lot on cron, and cron.daily, but naught on how you would determine what time of day "daily" actually meant.
I had a look at the run crons to try and figure out how it determined what time its daily jobs will run, and noted that it is actually determining its run time from its last run. It touches a file with a time/date stamp then, and then runs itself at 1440 minutes (thats 24 hours to us humans) after that time.
So the way to actually configure this is to use the "touch -t" command, which will then set the timestamp of said file. This can be in the past or future, and will determine when the script runs.
I did take a look to see if something like this also had a panel in yast2 - but unless I have missed something, cron completely fails to make an appearance there. Do let me know if I am misinformed here.
Anyway - this is not so much a question, as a sharing of experiences in the hope that some other soul googling this will find it.
That's interesting, I hadn't seen the cron config on a Suse system before. Off topic and probably only interesting to people who like to use several distros, on Slackware the root's crontab holds the periodic cron jobs and running crontab -l for the root user gives the following (plus other stuff):
The purpose is of course that the content of cron.daily will executed without the need to have the computer turned on at a specific time. In SUSE 10.1, there's an option in YaST (System->etc/Sysconfig-Editor->System->Cron) named DAILY_TIME. I think this is new in 10.1, and you can probably imagine what it does.
It touches a file with a time/date stamp then, and then runs itself at 1440 minutes (thats 24 hours to us humans) after that time.
Thanks for that. Can you tell us which file it touches? (Ubuntu isn't my main system so I can't easily look myself, but I do occasional work on a Ubuntu system and would like to know for future reference!)