0

I'm trying to run simple cronjob here

Line 1 0 19 * * * service mysql stop

Line 2 45 19 * * * service mysql start

However, nothing running so far. What did i missed here?

Logs showing below :

Oct 21 19:00:01 server1 CROND[5155]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Oct 21 19:00:01 server1 CROND[5153]: (root) CMDOUT (/bin/sh: service: command not found)
Oct 21 19:01:01 server1 CROND[5391]: (root) CMD (run-parts /etc/cron.hourly)
Oct 21 19:01:01 server1 run-parts(/etc/cron.hourly)[5391]: starting 0anacron
Oct 21 19:01:01 server1 run-parts(/etc/cron.hourly)[5400]: finished 0anacron

Oct 21 19:45:01 server1 CROND[16040]: (root) CMD (service mysql start)
Oct 21 19:45:01 server1 CROND[16041]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Oct 21 19:45:01 server1 CROND[16039]: (root) CMDOUT (/bin/sh: service: command not found)```





Daniel
  • 1
  • Does this answer your question? [Why is my crontab not working, and how can I troubleshoot it?](https://serverfault.com/questions/449651/why-is-my-crontab-not-working-and-how-can-i-troubleshoot-it) – Gerald Schneider Oct 21 '21 at 15:31

0 Answers0