[opensuse] hibernate preventing run of cron.daily; how to solve this?
A script of mine used to run in cron.daily, to do the necessary things that have to be done every day (eg. backup). This used to work fine. At present however, I usually switch off my machine with hibernate, and I suspect it doesn't run /etc/cron.daily/mydailyscript after starting up in the morning. Apparently in the morning it still is at the same time-point where it was the evening before. I searched the web and found I should add anacron to "Restart Services" in common.conf. However, my knowledge is too basic to understand what I should do. Someone at the list (or from SuSE professionals) who knows what I'm looking for, and could give me a hint? Thanks a milion Julien -- Julien Michielsen julien_at_michkloo.xs4all.nl -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Saturday, 2013-05-11 at 16:00 +0200, Julien Michielsen wrote:
A script of mine used to run in cron.daily, to do the necessary things that have to be done every day (eg. backup). This used to work fine. At present however, I usually switch off my machine with hibernate, and I suspect it doesn't run /etc/cron.daily/mydailyscript after starting up in the morning. Apparently in the morning it still is at the same time-point where it was the evening before. I searched the web and found I should add anacron to "Restart Services" in common.conf. However, my knowledge is too basic to understand what I should do. Someone at the list (or from SuSE professionals) who knows what I'm looking for, and could give me a hint?
Scripts stored in "cron.daily" runs once a day, but you do not choose the time they run at. You can choose a preferred time to run, though. If at that time the machine is not powered up, it will run on the next available chance. If several days pass without running (adjustable) then the scripts run within 15 minutes of the machine being started. This is adjusted in "/etc/sysconfig/cron". Warning: parts of this file are ignored when using systemd. Note: when you restore from hibernation, the clock might still display the time that was before hibernation, but it should correct itself to the correct time ASAP (seconds). If this is not happening you you, you found a bug. Using anacron in openSUSE needs knowledge of what to do, how not to break the system cron, and how to get anacron working correctly. I do not know this. - -- Cheers, Carlos E. R. (from 12.1 x86_64 "Asparagus" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) iEYEARECAAYFAlGOengACgkQtTMYHG2NR9UtowCfTb/jY6b5xismdrrFCpru9myV t84AniF5XBn5P9IQ0b8kyE2b9U9sxW2M =Hvrb -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
El 11/05/13 10:00, Julien Michielsen escribió:
A script of mine used to run in cron.daily, to do the necessary things that have to be done every day (eg. backup). This used to work fine. At present however, I usually switch off my machine with hibernate, and I suspect it doesn't run /etc/cron.daily/mydailyscript after starting up in the morning. Apparently in the morning it still is at the same time-point where it was the evening before. I searched the web and found I should add anacron to "Restart Services" in common.conf. However, my knowledge is too basic to understand what I should do. Someone at the list (or from SuSE professionals) who knows what I'm looking for, and could give me a hint? Thanks a milion
Julien
Cron design predates to the appearance of hibernate/suspend by a few decades, in the old times, computers had two states, ON and OFF :-) and "desktop unixes" where even more rare than now, fundamentally because computers were incredible expensive and had very limited resources. Cron wont be changed to adapt to this scenarios, however systemd timer units will be told a way to react properly in cases of: - timer events with system resume - timer units should get the ability to trigger when: + CLOCK_REALTIME makes jumps (TFD_TIMER_CANCEL_ON_SET) + DST changes This items are part of the TODO list and hence have not been implemented yet, but will in a future incarnation. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (3)
-
Carlos E. R.
-
Cristian Rodríguez
-
Julien Michielsen