Super User is a question and answer site for computer enthusiasts and power users. 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

I am writing some C++ code and would like that every 60 minutes, the code is "uploaded" to my external SVN repository. For doing this I just do "svn ci -m "some comment", but I want to do it automatically, so forget about this. I am working in mac os x, so I thought about using crontab but get some errors and I can not make it work. Do you know about a better solution?

P.S. This is what I did. First "crontab -e", then added the line

mac:temp john$ crontab -l
# m h  dom mon dow   command
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /Users/john/Desktop/temp/  

and I checked out that the script has execution permissions. I do not exactly get an error, the thing is that the script, supposed to run every 5 minutes, does not run at all. The same thing runs in linux perfectly

share|improve this question
Can you provide the error's you are getting with crontab? If you are looking for an alternative there is always Automator. – Shocm May 30 '11 at 9:17
Please state what exactly you are using in Crontab and which errors you get. We can't help you otherwise. – slhck May 30 '11 at 9:18
up vote 0 down vote accepted

I'll assume you have created a cron job but you get errors when it runs. It would be helpful to let us know what the errors are, but the most frequent issue people have with cron jobs is not specifying full paths in commands and files, or not having some other environment variable set that is required for the task

Running your script when logged in locally, you have a different set of environment paths that won't necessarily be there when cron executes your script. If your script expects the current working directory to be somewhere specific, make sure you cd to that directory within the script you are running.

Basically, when you create a script that you want to run, make sure you:

  1. Specify all paths fully

  2. Change directory if appropriate

  3. Set any environment variables that are required for your script/commands

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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