2

I want to run command "service php-fpm restart" each 1 minute and I tried to using contab.

I tried this code in contab file:

0/1 * * * * service php-fpm restart

In the file crontab from /var/spool/con/root, I put these code:

0 2 * * * chown -R nginx:nginx /home/
0 3 * * * echo 1 > /proc/sys/vm/drop_caches
0 4 * * * reboot
0/1 * * * * service php-fpm restart

All the command almost are running , but the command "service php-fpm restart" not.

1 Answers1

1

Besides the big question of why you need to restart every minute (feels like fixing a flat by making sure you have a airpump handy instead of stopping the leak) I wonder how you got a minute of "0/1"? To run something every minute you give it five stars

* * * * * /sbin/service php-fpm restart
lpaseen
  • 1,189
  • 8
  • 8