Search
 
SCRIPT & CODE EXAMPLE
 

PHP

how to run php script every 5 minutes

It would not surprise me that a hosting service would protect its servers from getting overloaded with long-running scripts, and would configure a time-out after which such scripts are aborted (see PHP: Runtime Configuration Settings and max_execution_time in particular).

If you have a PC that can stay turned on, an alternative solution would be to let it send a request to the server every 5 minutes:

############################################################################
<?php
    // Your PHP code that has to be executed every 5 minutes comes here
?>
<script>
setTimeout(function () { window.location.reload(); }, 5*60*1000);
// just show current time stamp to see time of last refresh.
document.write(new Date());
</script>
############################################################################
Comment

PREVIOUS NEXT
Code Example
Php :: toast in laravel 
Php :: select statement of table in phpmyadmin 
Php :: laravel get unique data by column and order by 
Php :: setup phpmyadmin to show create statement query 
Php :: laravel eloquent with nested 
Php :: $faker-paragraph 
Php :: Gate::before not working laravel 8 
Php :: php function return multiple values 
Php :: Laravel Deploy in production 
Php :: php get parent url from script location 
Php :: Laravel unique with Validation rule 
Php :: laravel sync with attributes 
Php :: php.validate.executablepath docker 
Php :: how to enable autoreload on save laravel 
Php :: json_decode php multidimensional array 
Php :: laravel route group 
Php :: laravel filesystem 
Php :: laravel create method 
Php :: Laravel Extract Values From Collection Using Pluck() with Relationship 
Php :: This domain is not registered with Tiny Cloud. Please see the quickstart guide or create an account. 
Php :: laravel check model column was changed 
Php :: php check string 
Php :: php response image 
Php :: php-array-delete-by-value-not-key 
Php :: add javascript to wordpress functions php 
Php :: access paginator object attribute in laravel 
Php :: country list laravel 
Php :: query builder laravel 
Php :: array_search function in php 
Php :: compress video file size php 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =