# Wowza Server need to restart automaticlly every 24 hr

**URL:** <https://community.wowza.com/t/wowza-server-need-to-restart-automaticlly-every-24-hr/94261>\
**Category:** Wowza Streaming Engine\
**Created:** [December 4, 2021, 7:01am UTC](https://community.wowza.com/t/wowza-server-need-to-restart-automaticlly-every-24-hr/94261 "2021-12-04T07:01:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nizad\_Sajeed](https://avatars.discourse-cdn.com/v4/letter/n/a587f6/32.png) [@Nizad\_Sajeed](https://community.wowza.com/u/Nizad_Sajeed)\
**Post date:** [December 4, 2021, 7:01am UTC](https://community.wowza.com/t/wowza-server-need-to-restart-automaticlly-every-24-hr/94261/1 "2021-12-04T07:01:00Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Dorota\_Szafer-Kwasik](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/dorota_szafer-kwasik/32/1150_2.png) [@Dorota\_Szafer-Kwasik](https://community.wowza.com/u/Dorota_Szafer-Kwasik)\
**Post date:** [December 4, 2021, 12:38pm UTC](https://community.wowza.com/t/wowza-server-need-to-restart-automaticlly-every-24-hr/94261/2 "2021-12-04T12:38:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Nizad\_Sajeed](https://avatars.discourse-cdn.com/v4/letter/n/a587f6/32.png) [@Nizad\_Sajeed](https://community.wowza.com/u/Nizad_Sajeed)\
**Post date:** [December 4, 2021, 2:40pm UTC](https://community.wowza.com/t/wowza-server-need-to-restart-automaticlly-every-24-hr/94261/3 "2021-12-04T14:40:02Z")

</div>

I’m using linux server edition.

---

<div class="post-metadata">

**Author:** ![Connessione](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@Connessione](https://community.wowza.com/u/Connessione)\
**Post date:** [December 4, 2021, 9:57pm UTC](https://community.wowza.com/t/wowza-server-need-to-restart-automaticlly-every-24-hr/94261/4 "2021-12-04T21:57:32Z")

</div>

1. 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.

1. Make sure it has proper permissions to be able to start / stop wowza.

2. 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.

3. 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.

---

<div class="post-metadata">

**Author:** ![Nizad\_Sajeed](https://avatars.discourse-cdn.com/v4/letter/n/a587f6/32.png) [@Nizad\_Sajeed](https://community.wowza.com/u/Nizad_Sajeed)\
**Post date:** [December 15, 2021, 12:55pm UTC](https://community.wowza.com/t/wowza-server-need-to-restart-automaticlly-every-24-hr/94261/5 "2021-12-15T12:55:15Z")

</div>

Thank you for your great Job
