So this is a problem I have encountered: I want to run a certain script every 8 hours and 1 minute. Due to the 24 hour loop of CRONjobs I'm a bit stuck on how to continue this 8h1m interval onto the next day.
I'm using Laravel PHP framework if that might help in finding an answer.
Other solutions besides CRON are welcome too. Note though that I would very much like to handle it serverside with PHP (I know its much easier in JavaScript where you would just interval 8h1m);
How about running this every minute.
$seconds = time();
$eightHoursThirtyMinutes = (8*60*60)+(30*60);
$minutes = $seconds - ($seconds % 60);
if($minutes % $eightHoursThirtyMinutes == 0)
{
// code here
}
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments