1

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 ?

1
  • 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, 2012 at 16:36

1 Answer 1

2

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .