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

I have a bunch of cron jobs which run every 30mins.

I'm currently doing some testing, and instead of setting the cron jobs to run every minute, is there a command which I can execute that'll run the cronjobs immediately?

Thanks for your help.

share|improve this question

migrated from Mar 2 '10 at 5:44

This question came from our site for professional and enthusiast programmers.

No it isn't.

Of course you can implement a different way, not using crond.

You can wrap your jobs into a script, being normally launched by cron, which you can therefore run by hand whenever you need

share|improve this answer
Ok, thanks for your comment. crontab is executed under which user? It would be useful to know so that I can set all the correct file permissions etc. Thank you. – Jamie Mar 1 '10 at 10:03
there is a user crontab, and a system wide one. Run crontab -e to edit the user's one; edit /etc/crontab to act upon the system wide one. – drAlberT Mar 1 '10 at 10:10
Excellent. Thanks very much! – Jamie Mar 1 '10 at 10:17
In general, a simple way to determine the environment in which cron is executing your job is to have cron run /usr/bin/env and examine the output. (eg, look for the value of USER) – William Pursell Mar 1 '10 at 17:08

I use this which runs scripts in much the same environment as cron:

echo "command" | at NOW
share|improve this answer
Except that at picks up the current environment; also, diff -u /etc/pam.d/{cron,atd} shows a few differences. – Tobu Jul 1 '10 at 16:25

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.