Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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've searched everywhere, but can't seem to find the answer. I'm trying to run this through Linux Debian SSH terminal

0 */5 * * * /var/www/test/cron.php

And of course there should be some keyword at first to make it run: for example

cron 0 */5 * * * /var/www/test/cron.php

But it doesn't work. What should I do ?

share|improve this question

migrated from Aug 6 '12 at 1:44

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

The way to install a cron entry is to edit the user's crontab. ssh remote crontab -e will bring up an editor. If you are unfamiliar with Unix editors, or prefer noninteractive operation, try ssh remote '(crontab -l; echo "0 */5 * * * /var/www/test/cron.php" ) | crontab -' – tripleee Aug 5 '12 at 16:36

Cron runs on a described schedule, you have the schedule set to 0 */5 * * * which is "every 5 hours". You can either wait for the 5th, 10th, 15th, or 20th hour for cron to run that command, or just execute the command /var/www/test/cron.php from the command line.

$ /var/www/test/cron.php

Alternatively, you could change the schedule so that it executes (almost) immediately by changing it in the crontab to:

* * * * * /var/www/test/cron.php

Then changing it back after it runs.

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.