The Cron Script

I’ve tested this nightly for a week or so and I’ve used it many more times when testing. I announced it to the A Small Orange forums a couple of days ago (at that time the mail command was limited and did actually work on ASO) and so far all is good. Heed the warning though – if you are unsure about cron, talk to your host !

Credits must go to these guys for their help and advice:
Justin –
Kyle –
Westi –
Any blame is all mine.

Apart from that, go keep your data safe 🙂

9 thoughts on “The Cron Script

  1. My Cpanel (Version 10.0.0-RELEASE 149) has the following hints in the cron panel:

    Hint: to run PHP files, enter the command as follows (modify to fit your needs):
    GET > /dev/null

    Hint: to run CGI files, enter the command as follows (modify to fit your needs):
    GET > /dev/null

    There is no hint for a .sh file. May I use Should I include de null directive? Besides, the panel has a field for the e-mail address. Is compatible with my server?

  2. Pingback: If..Else Log
  3. nomad – it should be just fine.
    The email address is there as well as in the script. I would install it as I have said, but set it for every hour – then wait until you either get an error message or you get the backup file. It won’t blow up your server 🙂 Your host will be able to advise further.

  4. Mark I’m new to shell script but there is something weird here:

    mail -s “MySQL Backup” -a backup-$DATE.sql.gz $MAILADDR
    echo ‘Your mySQL Backup is attached’ | mutt -a backup-$DATE.sql.gz $EMAIL -s “MySQL Backup”
    rm backup-$DATE.sql.gz


    Is that correct?

  5. nomad: Sorry about the error – it was found earlier.
    It seems to be a combination of the mail line and then the command use. It works fine on ASO servers but not others – as soon as I get a fix I will post it. Sorry!

Leave a Reply

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