What's new

Cron/Cru jobs disappear overnight

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

Jack Yaz

Part of the Furniture
Not sure when this started, initially noticed when using Skynet and it's debug checks. I've since removed it, and having specifically restarted VPN services yesterday, which added cru jobs to check up (via Poll Interval), and today, the cru jobs have vanished.

Any idea where I begin to look for the cause?

Router uptime at 13 days+, so its not a system reboot. I've factory reset since installing 380.68_2 as a troubleshooting step already.
 
Still having this happen occasionally, does anything run overnight that could interfere?
 
How do you add the jobs? Not that it matters but they are stored at /tmp/var/spool/cron/crontabs/<username> which is volatile.
Is /tmp running out of memory. Just a thought.
 
How do you add the jobs? Not that it matters but they are stored at /tmp/var/spool/cron/crontabs/<username> which is volatile.
Is /tmp running out of memory. Just a thought.

I use
Code:
cru a
, I don't touch the crontab file manually. Next time I spot a reset I'll check the modified time there though and see if I can match anything in the logs. I think storage is healthy, unless it's ballooning later on. I will keep an eye, thanks!
Code:
Internal Storage
NVRAM usage    54383 / 65536 bytes
JFFS    9.15 / 62.75 MB
 
Through which script do you add it. Are you sure there's no cru d line somewhere?
Deletion is only possible with cru d <jobname> or crontab -d <jobname>.
Both need the jobname to delete a job.
 
I think storage is healthy, unless it's ballooning later on. I will keep an eye, thanks!
Code:
Internal Storage
NVRAM usage 54383 / 65536 bytes
JFFS 9.15 / 62.75 MB
Not what @thelonelycoder was referring to.....use 'df' and check the %used of tmpfs
Sometimes ASUS has left a log active which fills up this space.
 
  • Like
Reactions: GWB
Through which script do you add it. Are you sure there's no cru d line somewhere?
Deletion is only possible with cru d <jobname> or crontab -d <jobname>.
Both need the jobname to delete a job.

Added from scripts that get called in services-start or firewall-start. Only cru a used in there. Only possible cru d could be the Poll Interval generated ones for the VPN. I'll take a poke on github and see how those are generated.

Not what @thelonelycoder was referring to.....use 'df' and check the %used of tmpfs
Sometimes ASUS has left a log active which fills up this space.
Looks good to me currently, if I'm reading it right?

Code:
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root                36096     36096         0 100% /
devtmpfs                127744         0    127744   0% /dev
tmpfs                   127848      6408    121440   5% /tmp
 
Make a cru job that writes to the syslog every couple of minutes? At least then you'll be able to see when it disappears.
 
Through which script do you add it. Are you sure there's no cru d line somewhere?
Deletion is only possible with cru d <jobname> or crontab -d <jobname>.
Both need the jobname to delete a job.
cru d is called when stopping an OpenVPN client/server, but since its referring to the specific cru job, I can't see why that would remove all but 1 job. I've removed all the cru a calls from the child scripts for now, leaving them just in service-start. Will leave it like this and see how it goes.
 
Try to delete a job with just cru d.
It will fail for the missing argument. Users accused AB to delete other jobs several times but that is impossible, AB cannot delete non-AB cronjobs.
Maybe you are onto something here? The ghost of Merlin?
 
Try to delete a job with just cru d.
It will fail for the missing argument. Users accused AB to delete other jobs several times but that is impossible, AB cannot delete non-AB cronjobs.
Maybe you are onto something here? The ghost of Merlin?
Spammed cru with various false jobs and no jobs, cru l remains intact. Wondering if rapidly adding cru a can cause it to fail, as I had several scripts that'd be called once a day each with their own cru a command.
 
Spammed cru with various false jobs and no jobs, cru l remains intact. Wondering if rapidly adding cru a can cause it to fail, as I had several scripts that'd be called once a day each with their own cru a command.
Depending on the services selected, AB deletes and creates about 5 jobs at once. I doubt the spamming is the cause.
 
Me too, but I'm struggling to think of what else could be causing it!
Do as @john9527 says. Maybe not syslog but to a file in jffs or usb with timestamp. The syslog gets purged when full.
echo $(date +"%H.%M.%S") >> /path/to/file
Would do.
 
Not sure when this started, initially noticed when using Skynet and it's debug checks.

For reference, Skynet doesn't modify any cronjobs but its own (nor use wildcards). Everything is referenced by exact name.

Code:
Unload_Cron () {
        cru d Skynet_save
        cru d Skynet_banmalware
        cru d Skynet_autoupdate
        cru d Skynet_checkupdate
}
 
Since removing the cru a calls from each script, all cron jobs have remained.

I will reintroduce the initial setup when I can run a maintenance window, Christmas holidays with family around probably not the best time haha.

Many thanks all for the help!
 
Since removing the cru a calls from each script, all cron jobs have remained.

I will reintroduce the initial setup when I can run a maintenance window, Christmas holidays with family around probably not the best time haha.

Many thanks all for the help!
If for some reason your router reboots, the cron jobs for sure will be gone then!
 
Yes, but the service-start will re-add them :p
Not if you removed all cru a instances in all scripts as you wrote.
Doesn't matter, festive days to you too.
 

Similar threads

Sign Up For SNBForums Daily Digest

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