Want to subscribe to topics you're interested in?
Become a Member

How to Create cronjob to restart php-fpm

Discussion in 'Nginx and PHP-FPM news & discussions' started by sikuman, Oct 31, 2018.

  1. sikuman

    sikuman New Member

    7
    1
    3
    Sep 25, 2017
    Ratings:
    +1
    Local Time:
    12:52 PM
    Hello,


    Could someone help me how to create cronjob to restart php-fpm ?
     
  2. eva2000

    eva2000 Administrator Staff Member

    58,893
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    3:52 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    You really don't want to do that - if you're php-fpm has issues with crashing, you need to deal with the root cause/issues. Though if you do need such a cronjob calling /etc/init.d/php-fpm would be fine
    Code (Text):
    /etc/init.d/php-fpm restart
    

    put that in a cronjob of your own scheduling