Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

zeroX's avatar
Level 6

Schedule

Hi,

i have three commands in the Kernel.php Schedule Function which needs to be executed at different times:

$schedule->command('events:get')->cron('*/4 * * * *');
$schedule->command('dailies:delete')->dailyAt('00:05');
$schedule->command('events:send')->dailyAt('20:00');

In Forge i set to run schedule:run every minute. Is this working or do i need to setup every command manually in Forge? I can't explain to myself how Forge will detect if for example the cron was running 4 minutes ago or not.

Thanks in advance for your help.

0 likes
1 reply
Snapey's avatar

its right. Every minute the scheduler checks the condition of your commands to see of they need to be run.

if the cron is */4 then it will run at every 4th minute 00:00, 00:04, 00:08, 00:12, 00:16, 00:20, 00:24, etc

It does now know or care when it ran last, its just looking for those times.

Please or to participate in this conversation.