[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to get rid of anacron?



Hello,

ti 28. kesäk. 2022 klo 10.24 Harald Dunkel (harald.dunkel@aixigo.com) kirjoitti:
>
> Hi folks,
>
> I do not like my cron jobs in /etc/cron.daily being ignored or
> delayed for some obfuscated reasons, so I wonder what is the
> recommended alternative to anacron with propper logging by
> default? Will systemd take care?
>
>
> Regards
>
> Harri
>

You have the choice between (A) traditional cron configuration in either /etc/cron.d or in crontab file, and (B) the systemd.timer. 

For systemd you can find an article from the following link, and the relevant man pages are 'man 5 systemd.timer' and 'man 7 systemd.time'. Latter manual contains the format of scheduling definitions.

https://opensource.com/article/20/7/systemd-timers

The basic idea is to have a service that is started explicitely (Type=oneshot) and a timer providing a schedule for the service. In the most simple setup the service and the time have the same basename.

BR,
Roland

Reply to: