LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Anacron not running in systemd? (https://www.linuxquestions.org/questions/linux-software-2/anacron-not-running-in-systemd-4175668689/)

p12funk 01-30-2020 05:59 AM

Anacron not running in systemd?
 
I have been using anacron to do daily backups for some time with no problems on my Linux Mint 18.1 system. On another laptop I installed Linux Mint 19.2 and used the same steps to backup, but it did not work. LM 19.2 is systemd and that may be the problem.

If I force it, anacron -d -f it will perform the backup. If I shut down for a few days and boot, it does not run the back up. It seems that anacron is not running on the LM 19.2 systemd machine unless it is started manually.

My question is: Is there an easy way to run anacron jobs in LM 19.2 without having to study systemd and systemd timers? I believe I have read that there are a couple of anacron offshoot programs that make anacron more compatible with systemd. Is this necessary to run anacron in systemd?

michaelk 01-30-2020 09:49 AM

Mint has both a systemd anacron service and timer. Make sure they are enabled and running.

p12funk 02-01-2020 05:58 AM

Sorry!
 
Sorry all. I am running a dual boot with Mint 19.2 and MX Linux. I found that on MX I had made a mistake in the name of the bash script to run for backup. It was off by a character in anacrontab! It works now. I could also not get it to run in Mint 19.2. But I logged in today an it ran ok. Probably the date in /var/spool showed it had already run, so of course it didn't. Or else I did not wait for the 2 minute delay. Anyway that back up also runs now. The fact that I had a problem in 2 different operating systems convinced me there was something wrong, but it was simply human error....twice. I am marking this as solved, and am sorry for wasting your time.


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