Running PHP Script With Cronjob

It’s easy to configure a cron job in cpanel, in order to run a php script automatically. You must know the physical path of the script. That will be:

/home/username/public_html/folder/filename

Replace username, folders and filename.

And the php path, which will be /usr/local/bin/php

The command will then be:

/usr/local/bin/php -f /home/username/public_html/folder/filename

Configure the time settings. And it’s done.

Tags:

Leave a Reply