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.

This entry was posted in Programming and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>