Setting up a cron job

Adrian shared this idea 4 years ago
Completed

I have set a test cron job up just to see how this works. Never used cron before. I set it for every 5 minutes, but when I use it properly in the future it will probably be set for once a day or something like that.


I uploaded cron.php file that sends me back a basic email.

In the command line in CPanel I entered the following.


Stars replace the username for obvious reasons.

/home/*********/public_html/cron.php


I don't seem to be getting any notification back.

Could somebody be kind enough to give me some tips on this.

Best Answer
photo

For the command, you may need to put "php" in front of it.


Just the script by itself may not do anything, so it's worth trying that first.

Comments (4)

photo
1

For the command, you may need to put "php" in front of it.


Just the script by itself may not do anything, so it's worth trying that first.

photo
1

I see so the command

php THEN THE PATH

photo
1

It would be "php /home/*********/public_html/cron.php"


Matt

photo
1

That worked, thank you very much.