Added an entry to crontab but something overwrote it later

Share your awesome tips and tricks here.

Moderator: Lillian.W@AST

Post Reply
markd
Posts: 1
youtube meble na wymiar Warszawa
Joined: Sat Mar 07, 2020 6:49 pm

Added an entry to crontab but something overwrote it later

Post by markd »

Hi,

I edited the crontab with "sudo crontab -e". But something has deleted what I added.

I may have disabled and re-enabled the "Scheduled export of System Settings" option in "Backup and Restore", or maybe some other option. I suspect that when I did that it overwrote the cron file with a default or standard one from somewhere.

Mark
User avatar
Nazar78
Posts: 2059
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Added an entry to crontab but something overwrote it later

Post by Nazar78 »

There's a cron check kept somewhere IIRC. I ended up running a separate crontab daemon in chroot.
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
User avatar
father.mande
Posts: 1815
Joined: Sat Sep 12, 2015 2:55 am
Location: La Rochelle (France)

Re: Added an entry to crontab but something overwrote it later

Post by father.mande »

Hi,
You have multiple easy choice for managing cron as you want ...
1 use autorun mechanism to start your own script at boot time ... so add your cron line
2 use a fake APKG to add some more control to avoid crontab replaced.
3 use Entware APKG that permit to add a private cron (but not in chroot)
... a start_up script exist at boot ... and are ignored by any ADM task changing lines et restarting ADM cron ... F.Y.I. task in ADM is name crond and cron in Entware ...

Philippe.
AS6602T / AS5202T /AS5002T / AS1002T / FS6706T
Post Reply

Return to “Tips & Tricks”