What's new

crontab loss

  • 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!

crontab is not persistent across reboots so you need to have a startup script that populates it.
no , I am talking in between reboots, not right after a reboot, like lets say i rebooted, verified crons were active and left it running and came back several hours later and now crons are no longer listed.
 
no , I am talking in between reboots, not right after a reboot, like lets say i rebooted, verified crons were active and left it running and came back several hours later and now crons are no longer listed.
I'm not aware of any process that would remove crontab entries. At least not deliberately.

What entries are being removed? Maybe there's a conflict/bug with some third-party software that you have installed.
 
well crons for several different scripts including couple of gui updates for jackyaz scripts, ntpmerlin, connmon, and a couple of personally inserted via init-start cronjobs, that just use curl to up date ip information in a couple of locations on the web.

I noticed the issue when i saw connmon graphs hadn't been updated for several hours, and I know my connection has been running.
 
Do you know if there any cron entries that are updated at any other time then the initial boot? Was there a new version of something that you installed?

the only thing i can think happen is a cron job hanged and caused it .
I can't think why that would be the case. Jobs that are invoked from cron do not write anything to the crontab.
 
i can't think of any, but what i can think is if cron some how crashed and restarted i don't know if that is possible.
 
Was this all cron jobs or just specific ones? Any chance your /tmp filesystem filled? Change your router username?
 
just specific ones.
connmon generate
ntpmerlin generate
then i had one that curls dnsomatic ever 3 hours.
I have one that rewrites a time stamp on a file.
which made no since for them to be missing, none that i can think of atleast.
 
i can't think of any, but what i can think is if cron some how crashed and restarted i don't know if that is possible.
Even if that were the case it wouldn't effect an existing crontab file. There is nothing in the basic firmware that touches the crontab files. It doesn't even exist unless you create it yourself (or through add-on software).
 
yea a reboot resolved the issue, but then vpn server 2 didn't cut on and its watchdog cron was missing from it not cutting on properly.
 
so I am kind of wondering if any stalls being created by the firmware starting up specific firmware related crons , i.e. */2 * * * * /etc/openvpn/server2/vpns-watchdog2.sh #CheckVPNServer2# getting hung because the server never started up properly, may cause this type of problem?

does this effect service-event?

Code:
  GNU nano 4.2              /jffs/scripts/service-event
#!/bin/sh
/jffs/scripts/connmon generate "$1" "$2" & # connmon
/jffs/scripts/uiDivStats generate "$1" "$2" & # uiDivStats
/jffs/scripts/scribe kill-logger nologo "$1" "$2" & # added by scribe
/jffs/scripts/ntpmerlin generate "$1" "$2" & # ntpMerlin
 
Last edited:
Okay so I read the logs, Nothing inside indicating to me the culprit, I will continue on and see if it happens again at some point in the future.
Was this all cron jobs or just specific ones? Any chance your /tmp filesystem filled? Change your router username?
Even if that were the case it wouldn't effect an existing crontab file. There is nothing in the basic firmware that touches the crontab files. It doesn't even exist unless you create it yourself (or through add-on software).
Thank you for feed back.
 
I experienced a wan down event and some of the crons are centered around weather the internet is connected during startup so i think this may be the culprit of all the missing schedules.
 
I experienced a wan down event and some of the crons are centered around weather the internet is connected during startup so i think this may be the culprit of all the missing schedules.
This is almost certainly what happened, many cron entries to start services needs an ntp time synch, or they fail.

I learned this the hard way after RMerlin integrated stubby / DoT. trying to customize stubby they way I had it when stubby was an add on. Ntp never synched, and my router was a mess, missing many cron entries. Took me the better part of a day to figure out why.. :oops: o_O :rolleyes:
 

Similar threads

Latest threads

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!
Top