Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

I just created a cron task do a backup of a 10GB MySql file once every week. How do I test it?

Specifically it should run as the user, do the output email and error log of the cron task

share|improve this question

marked as duplicate by Ward, kasperd, HBruijn Apr 7 at 14:17

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 2 down vote accepted

You can separate the testing of your script and cron-setup this way,

  1. Test your tool/script from the intended user login
    • verify that it works as expected (emails and logs, etc).
  2. Setup a trial run of issuing it 2 or three times in the next few minutes through cron
    • verify that the first run correctly as with expected results (similar to 1)
    • verify that the next runs continue to work correctly
      and don't get messed up with any effects of the past run
share|improve this answer

Set it to run every minute, then see if it successfully runs one minute later. Once you have it working, set it back to run every week instead.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.