Sunri5e Posted February 29, 2016 Share Posted February 29, 2016 I only use unRAID as hypervisor for my gaming machine and dont have it 24/7 running. Currently you are using crontab to run scheduled tasks but if my system is not running at this time, the cronjob is not executed. It would be nice if you could implement anacron as second choice. #/bin/bash # Concatenate the current set of plugin-specific cron files # into single system crontab. ENTRIES=$(cat /boot/config/plugins/*/*.cron 2>/dev/null) if (($? != 0)); then crontab -c /etc/cron.d -d else echo "$ENTRIES" | crontab -c /etc/cron.d - fi Quote Link to comment
SlrG Posted February 29, 2016 Share Posted February 29, 2016 +1 from me. I would really like this, too. Quote Link to comment
Sunri5e Posted February 29, 2016 Author Share Posted February 29, 2016 (I'm not responsible for any damage) I made a manual anacron setup via go script: #!/bin/bash # Start the Management Utility /usr/local/sbin/emhttp & # copy anacron binary and set permissions cp /boot/config/anacron/anacron /usr/sbin/ chmod 755 /usr/sbin/anacron # start anacron if all is ready if [ -x /usr/sbin/anacron -a -f /boot/config/anacron/anacrontab ]; then /usr/sbin/anacron -s -t /boot/config/anacron/anacrontab -S /boot/config/anacron/spool/ fi # /etc/anacrontab: configuration file for anacron SHELL=/bin/sh PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root # the maximal random delay added to the base delay of the jobs RANDOM_DELAY=45 # the jobs will be started during the following hours only START_HOURS_RANGE=3-22 #period in days delay in minutes job-identifier command 1 5 cron.daily nice run-parts /boot/config/anacron/cron.daily 7 25 cron.weekly nice run-parts /boot/config/anacron/cron.weekly @monthly 45 cron.monthly nice run-parts /boot/config/anacron/cron.monthly All you need is an anacron binary in /usr/sbin/ and to create all needed directories/your anacron scripts. Quote Link to comment
Derek_ Posted December 29, 2019 Share Posted December 29, 2019 Wow, this is old. I was going to ask for the same thing but in a new request. Please do add anacron. I imagine quite a few people do not leave their unRAID box on 24/7 and anacron is a tiny and sensible addition. Quote Link to comment
BRiT Posted December 29, 2019 Share Posted December 29, 2019 What benefits does "anacron" bring that isn't already provided by base unraid or unraid with user-scripts plugin? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.