Ubuntu 9 server cron jobs (cron.daily, cron.weekly etc)

I have some backup scripts that live in my home directory and are symlinked into the /etc/cron.daily and cron.weekly etc dirs. Apparently run-parts will not run scripts that have a ‘.’ in the filename, so the symlink to the .sh files has to be named minus the file extension.

Also, testing the scripts with ‘sudo runparts /etc/crond.daily’ gave errors like this:

<code>run-parts: failed to exec /etc/cron.daily/update_apache_logs: Exec format error</code>

To fix this, I added this to the top of each of the scripts:


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.