Score:0

Crontab start/stop mysql not running

us flag

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)```





in flag
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)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.