Luca Mainieri
Luca Mainieri

Reputation: 35

asterisk reboot via crono

we have a Zycoo Voip system. We cannot understand why but the system lost its connection and need frequently to be booted/restarted. We do not know how to debug it. To be more specific, we have set a crono to reboot and reload sip parameters on scheduled basis. This is our crono

    # file is /etc/crontabs/root
    50 3 * * *  /bin/rm -f /dead.letter
    0 */2 * * * sh /etc/scripts/logger.sh
    */5 * * * * sh /etc/scripts/emailtofax.sh
    */30 * * * * sh /etc/scripts/checkfree.sh
    0 0 * * * asterisk -rx "database deltree DCID"
    50 * * * * asterisk -rx "sip reload"
    0 8 * * * asterisk /bin/reboot

It looks like is not executing it at all.

We are running Asterisk 1.8.7.1

What is wrong with the above?

Upvotes: 0

Views: 162

Answers (2)

Luca Mainieri
Luca Mainieri

Reputation: 35

This would work 0 8 * * * /bin/reboot

Upvotes: 0

arheops
arheops

Reputation: 15259

There are no /bin/reboot command in asterisk

Use

 0 8 * * *  /usr/sbin/asterisk -rx "core restart now"

Upvotes: 1

Related Questions