I want to set a personal crontab in another folder and executed.

For example I want it in /home/project/tasks/crontab

Like that it's easier to add/delete tasks.

Thank you for your answers.


The cron daemon determines where your active crontab is stored. On my system (Ubuntu), and probably on yours, it's under /var/spool/cron/crontabs/.

But you can maintain your crontab entries anywhere you like. Just remember to run

crontab /home/project/tasks/crontab

every time you update it.

(I suppose you could set up a cron job to do that for you. Disclaimer: I haven't actually tried invoking crontab from a cron job; I'm not 100% sure it would work.)

I personally find that a lot easier to manage than using, say, crontab -e; I can maintain my crontab file under a source control system, so I don't lose anything if I accidentally do crontab -r, for example.


I suppose you could set up a cron job to do that for you. Just as an experiment, I tried setting up a crontab with the following command:

* * * * *    crontab .crontab

After manually running crontab .crontab once, changes in $HOME/.crontab were automatically applied after I saved the file, taking effect one to two minutes later.

But personally I'd much rather just run crontab FILENAME manually, so I don't have to worry about what will happen if I save an intermediate version of the file.

  • Thank you for your answer, I'll try all this. the thing is that the crontab is a shared one on SVN, and all dev doesn't have access to the server so can't launch it. In my ex company I just needed to update the crontab and it loaded everything automaticly. I'll try your methods. Feb 16 '12 at 2:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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