[4G MIFI] Cron job fail

Hello,
I have a issue with MIFI router and the crontab.
I try to find an solution all long a day’s but i can’t find the problem.

1 step:
I have set all parameter that i need in the router.
Everything work perfectly and i have enter this line in crontab in Luci.

55 23 * * * [ $( cat /proc/uptime | cut -d ‘.’ -f 1 ) -gt 180 ] && reboot

The router will reboot every day at 23H55. No problem!

In the log i have this output:

Wed Jul 31 17:47:21 2019 cron.info crond[1184]: crond (busybox 1.27.2) started, log level 0
Wed Jul 31 17:47:21 2019 cron.info crond[1184]: user:root entry:(null)
Wed Jul 31 17:48:57 2019 cron.info crond[1184]: user:root entry:(null)
Wed Jul 31 17:48:57 2019 cron.info crond[1184]: wakeup dt=96
Wed Jul 31 17:48:57 2019 cron.info crond[1184]: file root:
Wed Jul 31 17:48:57 2019 cron.info crond[1184]: line [ $( cat /proc/uptime | cut -d ‘.’ -f 1 ) -gt 180 ] && reboot
Wed Jul 31 17:48:59 2019 kern.notice kernel: [ 65.412384] random: crng init done
Wed Jul 31 17:49:00 2019 cron.info crond[1184]: wakeup dt=3
Wed Jul 31 17:49:00 2019 cron.info crond[1184]: file root:
Wed Jul 31 17:49:00 2019 cron.info crond[1184]: line [ $( cat /proc/uptime | cut -d ‘.’ -f 1 ) -gt 180 ] && reboot

2 step:
In this router, i’m create a backup file with Luci in system/backup/ flashfirmware generate archive.
There is no problem, archive is OK.

3 step
I apply this backup file in another MIFI router.
Everything work perfectly except the crontab, that doesn’t execute the job.
I have this output on the log:

Wed Jul 31 17:30:45 2019 cron.info crond[1186]: crond (busybox 1.27.2) started, log level 0
Wed Jul 31 17:38:00 2019 cron.info crond[1186]: wakeup dt=60
Wed Jul 31 17:39:00 2019 cron.info crond[1186]: wakeup dt=60
Wed Jul 31 17:40:00 2019 cron.info crond[1186]: wakeup dt=60
Wed Jul 31 17:41:00 2019 cron.info crond[1186]: wakeup dt=60
Wed Jul 31 17:42:00 2019 cron.info crond[1186]: wakeup dt=60
Wed Jul 31 17:43:00 2019 cron.info crond[1186]: wakeup dt=60
Wed Jul 31 17:44:00 2019 cron.info crond[1186]: wakeup dt=60

To get the job working, in need to click the “submit” button in Scheduled task in the Luci interface, otherwise it never execute the job.
Someone can help me, i don’t find any solution.

I need to find a solution without access to Luci, i have many routers to program with this backup file.

Many thanks

after you restore the settings in another mifi, can you reboot the device immediately to see if it take effect?

Because you restored the settings but the process is not restarted to take the config.

Hi Alzhao,

When i apply the backup file at the end of the upgrade the router reboot.

Even i reboot after, cron doesn’t work:(

can you pls check what is the difference in /etc/crontabs/ and /etc/rc.d/ in both situations?