openclaw - 💡(How to fix) Fix Bug: cron_remove returns 'not found' for jobs that exist in cron_list [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#52797Fetched 2026-04-08 01:19:15
View on GitHub
Comments
1
Participants
2
Timeline
1
Reactions
0
Author
Timeline (top)
commented ×1

Fix Action

Fix / Workaround

Workaround: Wait for session expiry or system restart.

RAW_BUFFERClick to expand / collapse

Bug Report

Summary: cron_remove and cron_update both return "cron job not found" for a job that is actively listed by cron_list and continues to fire on schedule.

Reproduction:

  1. Create a cron job (e.g. via cron_create)
  2. Confirm it appears in cron_list and fires on schedule
  3. Attempt cron_remove <job_id> — returns "cron job not found"
  4. Job continues to fire despite removal attempt

Details: This was observed with job watch-pr-megaseo-2662-slow (id: 1cc811e78391dccd46bd1f441e70554a). At least 7 removal attempts failed. The job eventually disappeared after a session expiry/restart.

Expected: cron_remove should successfully remove any job returned by cron_list.

Workaround: Wait for session expiry or system restart.

extent analysis

Fix Plan

The fix involves updating the cron_remove and cron_update functions to correctly handle job IDs and ensure consistency with the cron_list function.

Steps to Fix

  • Update the cron_remove function to use the correct job ID retrieval method.
  • Verify that the job ID is correctly passed to the removal function.
  • Ensure that the cron_list function is not caching outdated job information.

Example Code

def cron_remove(job_id):
    # Retrieve the job ID from the database or storage
    stored_job_id = get_stored_job_id(job_id)
    if stored_job_id:
        # Remove the job using the stored job ID
        remove_job(stored_job_id)
        return "Cron job removed successfully"
    else:
        return "Cron job not found"

def get_stored_job_id(job_id):
    # Implement the logic to retrieve the job ID from storage
    # This may involve querying a database or reading from a file
    pass

def remove_job(job_id):
    # Implement the logic to remove the job
    # This may involve updating a database or deleting a file
    pass

Verification

To verify that the fix worked, attempt to remove a cron job using the cron_remove function and confirm that it is no longer listed by cron_list and does not fire on schedule.

Extra Tips

  • Ensure that the cron_list function is not caching outdated job information by implementing a cache invalidation mechanism or using a cache with a short expiration time.
  • Consider implementing logging and error handling to diagnose and resolve any issues that may arise during the removal process.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING