Hi Mates,
I need to restart my wowza server in every 24hr with cronjob , I tried lot of scripts but did not work for me.
Any one can help me?
Hi.
In windows, this is trivially easy.
One stop.bat ends the action and the other start.bat starts the action. All run in Task Scheduler.
I’m using linux server edition.
- Create a bash script it’s the commands stop , pause android then start wowza. Like :
#!/bin/bash
sudo systemctl stop WowzaStreamingEngine
sleep 3
sudo systemctl start WowzaStreamingEngine
It is in wowza documentation.
Save it as restarter.sh In home directory or so.
-
Make sure it has proper permissions to be able to start / stop wowza.
-
To edit or create your own crontab file, type the following command at the UNIX / Linux shell prompt:
$ crontab -e
. Find more information on crontab via google. -
Register it for auto run via Cron using the following expression
0 8 * * *
Ie :
0 8 * * * /home/path/to/restarter.sh
This implies run the cron Job every day at 8 am. You can adjust it according to your use case.
2 Likes
Thank you for your great Job
1 Like