How to to run PHP script every hour (how to add php to cron)

Post Reply
User avatar
Site Admin
Posts: 936
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 8 times
Been thanked: 6 times

For example, let's say you want to run php script every hour.

First check what PHP version you are running.

Screenshot_117.png (69.81 KiB)

Then go to Add cron:

Screenshot_118.png (41.82 KiB)

Because we are running PHP 8.0 and our URL is and let's say we are under test account, our CRON command should look like:

Code: Select all

php8.0 /home/test/web/ > /home/test/php_cron.log 2>&1
Screenshot_119.png (46.76 KiB)
Post Reply