What's new

Crontab jobs disappeared.

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

I ran it from last night till now. Did "grep -a cru messages > cru1.txt". There was an auto-restart at 4:05am today. See the log.
Thanks. Here’s an example where the locking prevented concurrent updates (the cru PID directly above “Acquired cru lock” is different from its own):
Code:
Mar  8 04:07:04 RT-AC86U-9988 cru[9281]: Action: a, JobID: clearcache, Args: a clearcache 50 03 * * * /jffs/scripts/clearcache  2>&1 | /usr/bin/logger -t clearcache
Mar  8 04:07:04 RT-AC86U-9988 cru[9281]: Calling PID: 8413, CMD: /bin/sh /jffs/scripts/post-mount /tmp/mnt/spare
Mar  8 04:07:04 RT-AC86U-9988 cru[9281]: Acquired cru lock
Mar  8 04:07:04 RT-AC86U-9988 cru[9322]: Action: a, JobID: connmon, Args: a connmon */12 * * * * /jffs/scripts/connmon generate
Mar  8 04:07:04 RT-AC86U-9988 cru[9322]: Calling PID: 6062, CMD: /bin/sh /jffs/scripts/connmon startup /tmp/mnt/ac86u
Mar  8 04:07:05 RT-AC86U-9988 cru[9281]: Jobs before: 21, after: 21
Mar  8 04:07:05 RT-AC86U-9988 cru[9322]: Acquired cru lock
Mar  8 04:07:05 RT-AC86U-9988 cru[9410]: Action: a, JobID: temp, Args: a temp */15 * * * * /jffs/scripts/temp_check  2>&1 | tr -d '\n' | /usr/bin/logger -t Temp
Mar  8 04:07:05 RT-AC86U-9988 cru[9410]: Calling PID: 8413, CMD: /bin/sh /jffs/scripts/post-mount /tmp/mnt/spare
Mar  8 04:07:05 RT-AC86U-9988 cru[9322]: Jobs before: 21, after: 22
Mar  8 04:07:05 RT-AC86U-9988 cru[9410]: Acquired cru lock
Mar  8 04:07:05 RT-AC86U-9988 cru[9410]: Jobs before: 22, after: 22
 
Please update the script again to pick up a fix to make the calling PID parameters more readable. Thx!
With the updated script:
 

Attachments

  • cronj.txt
    28.4 KB · Views: 30
Well, my AX86S died good & proper.
So - now I'm the proud owner of an AX88U_Pro.
All setup and running remarkably easily.

But I noticed a new cru 'thing' in the logs - when the WAN comes up, something tries to deleted a 'Wireguard' cronjob.
I didn't realize I was running Wireguard. Am I running Wireguard?

Code:
10-Mar 07:54:44 AX custom_script: Running /jffs/scripts/wan-event (args: 0 connected)
10-Mar 07:54:44 AX custom_script: Running /jffs/scripts/firewall-start (args: eth0)
10-Mar 07:54:44 AX wan: finish adding multi routes
10-Mar 07:54:44 AX cru[2983]: Action: d, JobID: WireGuard, Args: d WireGuard
10-Mar 07:54:44 AX cru[2983]: Calling PID: 2915, CMD: /tmp/udhcpc_wan bound
10-Mar 07:54:44 AX cru[2983]: Acquired cru lock
10-Mar 07:54:44 AX cru[2983]: Jobs before: 4, after: 4
10-Mar 07:54:44 AX ddns: IP address, server and hostname have not changed since the last update.
 
That must be normal as I see it on my RT-AX88U. I never noticed it until I seen you mention it. The reason? Probably to make sure wireguard is in a good known state. I saw Dave posted made a Commit on github.
[/presumption]
 
Last edited:
The cru replacement in post #79 has been updated with locking. Follow the instructions there:

Has been running this for a week now - appears working very nicely. All BACKUPMON jobs now occur as scheduled (@Viktor Jaep). For a while I had the backup job in services-start run only every other time or similar
Code:
cru a RunBackupMon "46 14 * * * sh /jffs/scripts/backupmon.sh"
,
while the same job in post-mount was more reliable
Code:
cru a RunBackupMon0 "28 4 * * * sh /jffs/scripts/backupmon.sh"

But now the job from services-start works all the time (see present or missing 14:46 file timestamp below):
Code:
admin@RT-AC86U-9988:/# ls -lta /tmp/mnt/spare/router/AC86U-Backup/*/jffs*
-rw-rw-rw-    1 admin    root       4606370 Mar 14 14:46 /tmp/mnt/spare/router/AC86U-Backup/14/jffs.tar.gz
-rw-rw-rw-    1 admin    root       4581337 Mar 13 14:46 /tmp/mnt/spare/router/AC86U-Backup/13/jffs.tar.gz
-rw-rw-rw-    1 admin    root       4577759 Mar 12 14:46 /tmp/mnt/spare/router/AC86U-Backup/12/jffs.tar.gz
-rw-rw-rw-    1 admin    root       4573016 Mar 11 14:46 /tmp/mnt/spare/router/AC86U-Backup/11/jffs.tar.gz
-rw-rw-rw-    1 admin    root       4582976 Mar 10 14:46 /tmp/mnt/spare/router/AC86U-Backup/10/jffs.tar.gz
-rw-rw-rw-    1 admin    root       4571448 Mar  9 14:46 /tmp/mnt/spare/router/AC86U-Backup/09/jffs.tar.gz
-rw-rw-rw-    1 admin    root       4548601 Mar  8 14:46 /tmp/mnt/spare/router/AC86U-Backup/08/jffs.tar.gz
-rw-rw-rw-    1 admin    root       4413900 Mar  7 04:28 /tmp/mnt/spare/router/AC86U-Backup/07/jffs.tar.gz
-rw-rw-rw-    1 admin    root       4542100 Mar  6 14:46 /tmp/mnt/spare/router/AC86U-Backup/06/jffs.tar.gz
-rw-rw-rw-    1 admin    root       4380330 Mar  5 04:28 /tmp/mnt/spare/router/AC86U-Backup/05/jffs.tar.gz
-rw-rw-rw-    1 admin    root       4365080 Mar  4 04:28 /tmp/mnt/spare/router/AC86U-Backup/04/jffs.tar.gz
-rw-rw-rw-    1 admin    root       4360129 Mar  3 04:28 /tmp/mnt/spare/router/AC86U-Backup/03/jffs.tar.gz
-rw-rw-rw-    1 admin    root       4472957 Mar  2 14:46 /tmp/mnt/spare/router/AC86U-Backup/02/jffs.tar.gz
-rw-rw-rw-    1 admin    root       4485265 Mar  1 14:46 /tmp/mnt/spare/router/AC86U-Backup/01/jffs.tar.gz
-rw-rw-rw-    1 admin    root       4624396 Feb 29 04:28 /tmp/mnt/spare/router/AC86U-Backup/29/jffs.tar.gz
-rw-rw-rw-    1 admin    root       4610237 Feb 28 04:28 /tmp/mnt/spare/router/AC86U-Backup/28/jffs.tar.gz
-rw-rw-rw-    1 admin    root       4576974 Feb 27 04:28 /tmp/mnt/spare/router/AC86U-Backup/27/jffs.tar.gz
-rw-rw-rw-    1 admin    root       4580845 Feb 26 04:28 /tmp/mnt/spare/router/AC86U-Backup/26/jffs.tar.gz
-rw-rw-rw-    1 admin    root       4585391 Feb 25 04:28 /tmp/mnt/spare/router/AC86U-Backup/25/jffs.tar.gz
-rw-rw-rw-    1 admin    root       4604815 Feb 24 04:28 /tmp/mnt/spare/router/AC86U-Backup/24/jffs.tar.gz
-rw-rw-rw-    1 admin    root       4695879 Feb 23 14:46 /tmp/mnt/spare/router/AC86U-Backup/23/jffs.tar.gz
-rw-rw-rw-    1 admin    root       4576976 Feb 22 04:30 /tmp/mnt/spare/router/AC86U-Backup/22/jffs.tar.gz
-rw-rw-rw-    1 admin    root       4730094 Feb 21 14:46 /tmp/mnt/spare/router/AC86U-Backup/21/jffs.tar.gz
-rw-rw-rw-    1 admin    root       4612622 Feb 20 04:28 /tmp/mnt/spare/router/AC86U-Backup/20/jffs.tar.gz
-rw-rw-rw-    1 admin    root       4593213 Feb 19 04:28 /tmp/mnt/spare/router/AC86U-Backup/19/jffs.tar.gz
-rw-rw-rw-    1 admin    root       4622219 Feb 17 04:28 /tmp/mnt/spare/router/AC86U-Backup/17/jffs.tar.gz
-rw-rw-rw-    1 admin    root       4561403 Feb 16 04:28 /tmp/mnt/spare/router/AC86U-Backup/16/jffs.tar.gz
-rw-rw-rw-    1 admin    root       4703573 Feb 15 14:46 /tmp/mnt/spare/router/AC86U-Backup/15/jffs.tar.gz
 
Do we think that the problem has been found and fixed then?
 
Do we think that the problem has been found and fixed then?
Certainly seems so. Haven't had any more mystery disappearances since I updated to the latest cru script.
 
And I'm really glad to know it wasn't me, or some other developer that was pumping out shoddy code that was clearing out the cru jobs. ;)
 
Hi there,

I just loaded up the new 3004.388.7_beta1
I first removed the 'mount' command in init-start that overwrites /usr/sbin/cru
I see the new /usr/sbin/cru now has the 'flock' commands in it.
Is that all OK now?
 
Hi there,

I just loaded up the new 3004.388.7_beta1
I first removed the 'mount' command in init-start that overwrites /usr/sbin/cru
I see the new /usr/sbin/cru now has the 'flock' commands in it.
Is that all OK now?
Yes, it's all sorted now - normal service has been resumed (since the first alpha).
 
Yes, it's all sorted now - normal service has been resumed (since the first alpha).
I notice it no longer writes to syslog when it adds/deletes jobs
Is that the intention?
 
I notice it no longer writes to syslog when it adds/deletes jobs
Is that the intention?
Correct, Merlin did not add the logging. It's in the changelog
 

Similar threads

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