Skip to content

Conversation

@techmahedy
Copy link
Member

Problem

Second-based schedules like everyThirtySeconds() were executing every second instead of respecting their configured intervals. A command scheduled to run every 30 seconds was triggering 30 times instead of once per interval.

Root Cause

The daemon was checking isDue() every 100ms (10 times per second). When a command became "due" at a particular second, it would execute multiple times within that same second because:

Implemented proper interval-based execution tracking using React PHP Event Loop

# Start daemon
php pool cron:daemon start
php pool cron:run --daemon

# Schedule in App/Schedule/Schedule.php
$schedule->command('doppar:second-test')->everyThirtySeconds();

# Expected: Command executes at 0s, 30s of each minute
# Previous: Command executed every second

@techmahedy techmahedy added the bug Something isn't working label Jan 22, 2026
@techmahedy techmahedy merged commit 8bb9830 into doppar:3.x Jan 22, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant