Skip to main content
vraev
Staff
Staff
June 9, 2026

Technical Tip: Setting up a periodic restart of the app server

  • June 9, 2026
  • 0 replies
  • 50 views

Description

This article describes the steps to set up a periodical restart of a specific service.


Scope

FortiSIEM.

Solution

If an email service stops working, it can be automatically restarted periodically by using a script and setting up a cron job.

cat > /root/servicerestart.sh << EOF
#!/bin/bash

systemctl restart httpd
sleep 2m
/opt/phoenix/phscripts/bin/phRestartAppServer
EOF

chmod +x /root/servicerestart.sh

echo "# At 04:05 on every 10th day-of-month." > /etc/cron.d/servicerestart
echo "5 4 */10 * * root /root/servicerestart.sh" >> /etc/cron.d/servicerestart