Since quite a while i was often asked if there is a possibility to store entries into crontab permanently on NAS devices with fun_plug. That is not that easy as the devices reset their crontab to the default one on every reboot. Therefore you need to add the entries every time the device reboots. I have now developed a script which automates that for your convenience.
The package with the name “uwcron” is available via my repository:
slacker -UaA uli:uwcron [[ -f /ffp/start/uwcron.sh.new ]] && mv /ffp/start/uwcron.sh.new /ffp/start/uwcron.sh
As soon as this is installed, you can start with the configuration. The configuration files should be created in /ffp/etc/cron.d/. These could look like this:
*/5 * * * * /tmp/uwfancontrol.sh
When all configuration files are created, the service can be started. This works as with all other services:
chmod a+x /ffp/start/uwcron.sh /ffp/start/uwcron.sh start
Now you should see your entries in crontab:
crontab -lIf the device is rebootet, all entries from these files in /ffp/etc/cron.d/ would be copied into crontab. if you made a change to a file, you could also just restart the service instead of the complete NAS:
/ffp/start/uwcron.sh restart
Questions?
Thank you! I set uwcron on my D-Link DNS-325. Everything works fine.
Thank you.
Sadly the first instruction is not clear: are we supposed to run ‘slacker -UaA… ‘ and then enter the next line “[[ -f /ffp… ” ?
Are both one command or 2?
Using ‘slacker -UaA… ‘ seems to install fine.
Please advise.
Hi Oni,
these are two commands, you need to execute them both. If this is the first installation, you could leave it aside, but just to be sure, do them both.
Best Regards,
Uli
After the install of uwcron on the DNS320, every command for crontab results in the following error message: “crontab: symbol ‘_res’: can’t resolve symbol”
I created in /ffp/etc/cron.d/ the file ‘rsnapshot’ with standard cron instructions.
Looks like the PATH is not set properly. Can you run your commands with full path?
Best Regards,
Uli
That did it
Ok, works perfectly with full path.
Did work without full path before the installation, though…