linuxcroncentosred5

Cron job to restart a software in Centos 6


I want to add a cron job in my Centos 6 x86_64 bit VPS.

I have a software installed on my VPS red5

Installation location: /usr/local/red5

Executeable file path: /usr/local/red5/red5.sh

Service file path: /etc/init.d/red5

I want this software to be restart automatically via cronjob. after every 5 days

What should be the cronjob syntax for this task to be done.


Solution

  • Add the folowing to /etc/anacrontab

    5 10 red5-restart /etc/init.d/red5 restart

    source