By fredrikwirth
Hello! I tried to setup a cronjob with crontab to run a shell script every 10 minute. But it´s not working. The Shell Script file: " #!/bin/bash
rm -f /var/log/messages "
The Crontab -E Config file: " */10 * * * * /vpndel/script "¨
But when i check the log file the text is still there after 10 minutes have gone?
What could be wrong?
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!
Perhaps these might be helpful: <br> <br>1.) <a href=“https://digitalocean.com/community/articles/how-to-write-a-simple-shell-script-on-a-vps”>How To Write a Simple Shell Script on a VPS</a>; <br> <br>2.) <a href=“https://digitalocean.com/community/articles/how-to-write-a-simple-shell-script-on-a-vps-part-2”>How To Write a Simple Shell Script on a VPS (Part 2)</a>; <br> <br>3.) <a href=“https://digitalocean.com/community/articles/how-to-write-a-simple-shell-script-on-a-vps-part-3”>How To Write a Simple Shell Script on a VPS (Part 3)</a>; <br> <br>4.) <a href=“https://digitalocean.com/community/articles/how-to-use-a-simple-bash-script-to-restart-server-programs”>How To Use a Simple Bash Script To Restart Server Programs</a>.
Are its permissions set properly? Try running <code>chmod +x /vpndel/script</code>.
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.