By kmeansrich
How To Restart APACHE AND SQL AFTER EVERY 15 MINUTES ? if cron job how can i add cron job These 2 jobs i add in crontab -e BUT NOT WORKING
*/15 * * * * echo "sudo service apache2 restart’ */15 * * * * echo "sudo service mysql restart’
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
You need to “sudo -s” for your shell (where you’ll become root) and then crontab -e to put these two jobs:
*/15 * * * * service apache2 restart
*/15 * * * * service mysql restart
Run the commands on the shell to make sure your services are named as such (sometimes it’s httpd instead of apache2 and mysqld instead of mysql).
Cheers
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.