What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

cronjob gone after reboot using cru

brooky

Occasional Visitor
Hi All,

I have written a shell script to delete all files on a USB drive older than 14 days. I have an IP camera recording to the a USB drive on the router and I want a 14 day retention. The script can be found at:

Code:
/jffs/scripts/cctv.sh

I then created a cron using "cru" to run at midnight:

Code:
cru a cctv "0 0 * * * /jffs/scripts/cctv.sh"

If I then run "cru l" to list cron jobs I see:

Code:
0 0 * * * /jffs/scripts/cctv.sh #cctv#

However after I reboot the server "cru l" returns nothing?!

Does anyone know why it's lost after reboot? The shell file exists still.
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top