Use fcron like anacron - Gandalf's Blog

โ† All posts

โ€‹ - โ€‹

Use fcron like anacron

#linux #tips

By default, after installing and enabling the fcron daemon, you won't get hourly, daily, weekly and monthly execution of the scripts in the respective /etc/cron.* directories, if your system is asleep at the wrong moment. Here's a crontab which will work like anacron:

As root, execute: fcrontab -u systab -e ...comment-out the existing lines from the text that appears, and type in the following:
txt
%hourly,runas(root) 0-59 /usr/bin/run-parts /etc/cron.hourly
%daily,runas(root) 0-59 0-23 /usr/bin/run-parts /etc/cron.daily
%weekly,runas(root) 0-59 0-23 /usr/bin/run-parts /etc/cron.weekly
%monthly,runas(root) 0-59 0-23 1-31 /usr/bin/run-parts /etc/cron.monthly
...and then save.