OpenWrt Forum Archive

Topic: A bug of crontab in CC?

The content of this topic has been archived on 18 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi, guys. After I set a cron job like : "* */6 * * * reboot" . The router will reboot again and again every 1 or 2 minute. I think it's a bug. Are there anyone have this problem?

Model:D-Link DIR-615 D
Firmware Version: OpenWrt Chaos Calmer 15.05 / LuCI Master (git-15.233.47308-791ca8b)

(Last edited by fitttr on 26 Sep 2015, 11:35)

Will your router reboot again and again after you unset the cron job?

mazilo wrote:

Will your router reboot again and again after you unset the cron job?

No, and there is not problem when i set cron job like "30 4 * * * reboot".

(Last edited by fitttr on 26 Sep 2015, 11:39)

Exactly. So, what do you expect the cron job like : "* */6 * * * reboot" will do?

mazilo wrote:

Exactly. So, what do you expect the cron job like : "* */6 * * * reboot" will do?

The router reboot every 6 hours.

fitttr wrote:

The router reboot every 6 hours.

Do 4 lines
0 0 * * * reboot
0 6 * * * reboot
0 12 * * * reboot
0 18 * * * reboot

danymarc wrote:
fitttr wrote:

The router reboot every 6 hours.

Do 4 lines
0 0 * * * reboot
0 6 * * * reboot
0 12 * * * reboot
0 18 * * * reboot

This is a good idea.Thanks.

fitttr wrote:

This is a good idea.Thanks.

Or put a 0 instead of * in first place

fitttr wrote:
mazilo wrote:

Exactly. So, what do you expect the cron job like : "* */6 * * * reboot" will do?

The router reboot every 6 hours.

If I were to do this, I would use * 6 * * * reboot" (as suggested by danymarc) instead of this * */6 * * * reboot" .

mazilo wrote:

If I were to do this, I would use * 6 * * * reboot" (as suggested by danymarc) instead of this * */6 * * * reboot" .

that is a reboot every minute from 06:00 till 06:59

The discussion might have continued from here.