Running code after a certain time in php

I need to run the code on the server again and again after a certain time. Can this be done?

I am using PHP.

+2
source share
5 answers

You can create scheduled tasks through CronJobs.

Also check out this article to run PHP scripts through Cron.

So, basically, you will need to create a script that you want to run through PHP, and using the above articles create Cron in a certain interval.

+4
source

You can use the Cron job to invoke a PHP script at regular intervals.

+1
source

, , Cron

Cron - Linux . Windows, . Cron , , .

+1

, Cron . php cli, PHP- . , Cron .

0

Cron, PHP script . , , :

/usr/bin/php -q /home/USERNAME/public_html/PathToFile

Configuring cron will allow you to set how often your script will run every minute, 5 minutes, hour, daily, weekly, etc.

0
source

All Articles