How to Automatically Restart FreePBX Services Daily

I currenlty have FreePBX running in out company 2.6.0.1 version I would like to setup the services where it would restart daily at 4am. Can you send me how to do this and steps please.

  • Just for Notes since I see on the main menu as well “UPTIME” LAST RELOAD: was 4 days and like 22 hours.

I set up on the AD under “ROOTPHONE” CRON JOB to restart doens’t look like that works so was wondeirng if something eaiser I can do or help me greatly apprecitated.

Here was my CRON Job entry I put in don’t know if this is right but doesn’t restart daily:

0 11 * * * /etc/webmin/cron/tempdelete.pl
2 * * * * /var/lib/asterisk/bin/freepbx-cron-scheduler.php
@hourly /etc/webmin/time/sync.pl
0 5 * * * root /usr/sbin/asterisk -rx “restart now” >/dev/null 2>&1

Thanks

Why would you need to do this? We have has Asterisk in high load environments run for over a year without any restarts.

Skyking

Why does it matter why he wants to do it?

mehult99

What about

/usr/local/sbin/amportal restart

It matters because it would be better to focus on the problem that is causing the perception the services/machine needs to be restarted daily. That should not be required under any circumstances.

Because it is highly unusual to have to reboot a PBX traditional or VoIP once a year, let alone every day.

Needing to write a cron job for that activity strongly that there may well be a more serious underlying problem that the OP may/may not be aware of - off the top of my head, he might find that his PRI’s are losing sync and that a reboot brings them back up, instead of looking at the logs and finding he has a clocking issue.
That’s like taking painkillers every day to ease toothache, when a trip to the dentist would reveal a rotten tooth.

It was a valid question you could expect from any decent tech support person.

Actually I’m new to this whole phone system thing I’m more of a Network Admin on Windows side, I just put into this role in managing there phone system actually.

Company is about 30-40 users and everyday the liasons and other users have issues in not getting incoming or calls are slow when connecting or at times people can here them so what they did mostly daily was to "restart the services"
in doing a “SERVICE ZAPTEL RESTART” command and that seems to fix the issue always. This shouldn’t be like this look and shouldn’t have to baby this thing daily and doing a “RESTART”.

So since I’m new can you point me into some directions your thoughts and what I can do and how to test this thing some steps please or commands. be helpful from you PROs.
Thanks

If you have 40 users and no experience managing phone systems or troubleshooting phone lines I respectfully suggest you utilize our support services and engage a technician.

Business is too important to risk your company learning during a real outage.

The solution you proposed is dangerous and does not fix anything.

If it was up to me I would use you guys, it more just tune up and looking over the setting and etc. Daily everything works fine just once in a while we get some bugs and we need to restart the services and works fine. If the budget was there I would atleast let you look over our setting and some tune up. But not up to me.