Help! Crontab change does not survive reboot, despite following guideline

Don't miss a thing. Post your questions and discussion about other uncategorized NAS features here.
Post Reply
bert.r
Starting out
Posts: 34
Joined: Thu Jan 29, 2009 4:19 pm

Help! Crontab change does not survive reboot, despite following guideline

Post by bert.r » Sun May 31, 2020 12:04 am

Hello everyone,

I'm having a TS-253A (now running QTS 4.4.2.1310) on which I'm having a problem with one line in the crontab. Two years ago, when I set up the system, I added a couple of crontab lines. They all survive reboots except for one. Very likely, I've added the surviving lines in a different way than the disappearing one, but I don't remember that anymore.

The disappearing line is this:

Code: Select all

0 21 * * * /opt/sbin/logrotate /opt/etc/logrotate.conf
I add that as described here:

Code: Select all

vim /etc/config/crontab
crontab /etc/config/crontab && /etc/init.d/crond.sh restart
Still, when I reboot, it's gone. In the past two years, I've been applying QTS updates regularly and faced this issue with every QTS version.

Any idea?

Regards,
Bert

User avatar
OneCD
Ask me anything
Posts: 8590
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: Help! Crontab change does not survive reboot, despite following guideline

Post by OneCD » Sun May 31, 2020 3:07 am

bert.r wrote:
Sun May 31, 2020 12:04 am
Any idea?
The cron system in QTS periodically re-writes the crontab. Which has a bad habit of removing user customisations. :(

If you want to stick with QTS cron, you'll need to keep re-adding your crontab entries.

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

bert.r
Starting out
Posts: 34
Joined: Thu Jan 29, 2009 4:19 pm

Re: Help! Crontab change does not survive reboot, despite following guideline

Post by bert.r » Mon Jun 01, 2020 8:20 pm

Too bad!
What would be the alternative for the QTS cron?

User avatar
OneCD
Ask me anything
Posts: 8590
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: Help! Crontab change does not survive reboot, despite following guideline

Post by OneCD » Tue Jun 02, 2020 4:01 am

There's also cron available via the Entware QPKG.

Or you could dump QTS entirely and load your own OS. Debian is a popular choice. :geek:

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

bert.r
Starting out
Posts: 34
Joined: Thu Jan 29, 2009 4:19 pm

Re: Help! Crontab change does not survive reboot, despite following guideline

Post by bert.r » Tue Jun 02, 2020 2:09 pm

Thanks a lot!

Post Reply

Return to “Miscellaneous”