How to run a CRON every 8h and 1 minute

Flame

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);

Pawel Bieszczad

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.

edited at
0

Comments

0 comments
Login to comment

Related

How to run cron in serverless for every minute?

How to run a cron job to execute every minute?

How do I make cron run something every "N"th minute, where n % 5 == 1?

jenkins cron: run every 3rd minute, starting at 1

how to run this script in cron.d every minute?

How to run a cron jobs in every minute for a specific hour on server

Why does my cron job run every 1 minute although I set it every 1 hour?

run cron every minute during a specific hour?

Run a cron job every minute, meaning of syntax

python apscheduler not execute by cron for every 1 minute

Run a Jenkins job every one minute using H/1 * * * *

How to run an iOS application every 1 minute infinitely?

How to set cron job to run every minute between 11 PM to 12AM Midnight

Run cron job every 2 hours In the X minute

How to run every 3 minute in Quartz scheduler?

How to fire a cron every minute for two separate applications?

Setting cron task every day at 2am.. makes it run every minute

Why my cron job is running every minute when it is scheduled to run every hour?

How to make cron run only 42 times in 10 minute intervals?

How to run a cron task at the last minute of each day?

Cronjob understanding: how to run every day from 8-10 till 10-30 every 10 and 30 minute?

Run cron job every 2 minutes except the first minute "0" of the first hour "0"

How do I run a script for 1st working day of every month in cron?

Android - how to run a piece of code every minute (synced with the device time)

how to schedule a c function to run exactly every minute

How to configure azure webjob to run every 15 minute

How do I make this function in Google sheet run "every minute"?

how to run `php artisan queue:work` every minute on cpanel?

Run a function at the start of every minute?