SUSE / openSUSEThis Forum is for the discussion of Suse Linux.
Notices
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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!)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.