NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
9300170
Sep 02, 2019Aspirant
Delay Scheduled Power Down
I have a scheduled cron job that zips up my backup files and places them in a share that is kept in snyc with my google drive. I run a special cron job because I want an extra level of encryption for my files that go to the cloud. The job runs fine, creates bite size files that are uploaded to google drive. It takes about 2-3 days to compress my data but then another 10-15 days to updload to google.
The only problem that I am having is that I also have a scheduled power down. Under normal circumstances, I only start up this NAS at midnight to back up my other NAS. It powers down about an hour later unless there is a long backup job that is running. ReadyNAS is smart enough to not power down during its own backups.
What I really need is a command or process that I can add to my cron job that will delay this shutdown while my home-grown backup is running.
Any thoughts how I can delay shutdown for my own process or job on a readNas?
1 Reply
Replies have been turned off for this discussion
- SandsharkSensei
You could try adding a test condition to /etc/cron.d/poweroff. The basic form * * * * * test ! -f /tmp/skip && /path/to/script... looks for a file named /tmp/skip and skips the execution if it exists. So, your zipping script could create and remove the "skip" file. Now, that will only stop it from happening completely till the next scheduled event, not delay it. If you want to delay it, you'll need to make changes to /frontview/bin/autopoweroff.
You'll probably have to re-do anything you do after an OS update, so keep a copy handy.
If you try anything, please let us know what works and what doesn't.
Related Content
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!