this is what i did..
- In the /root/ directory i created a file called rebootasterisk.cron by typing:
vi /root/rebootasterisk.cron- Put this into the file:
#!/bin/sh
/usr/sbin/asterisk -rx "restart now"
Set permissions: chmod +x /root/rebootasterisk.cron
chmod 0777 /root/rebootasterisk.cron
Create the cron job using this command:
crontab -e
create a new line that looks like this:
0 4 * * * /root/rebootasterisk.cron
Saved it... and Done!!!
Tomado de: