Rocky EsselR
Convex Community5w ago
2 replies
Rocky Essel

Getting ‘Invalid syscall’ when cancelling a scheduled task inside a Convex action

🪲Bug Report
I’m getting the following error when trying to cancel a scheduled task from within a Convex action:

Invalid syscall. The Convex syscalls are for internal Convex use and should not be called directly.


This error is triggered specifically when cancelling the schedule. In a previous project, I pushed Convex pretty far in terms of implementation and never ran into this issue before, so this is the first time I’m seeing it.

Is there something about cancelling schedules from actions that’s not supported, or am I missing a required pattern or boundary between actions and mutations here?


  if (draft.scheduled_job_id) {
        console.log("publish_scheduled_article 38");
        console.log({ scheduled_job_id: draft.scheduled_job_id });
        await ctx.scheduler.cancel(draft.scheduled_job_id);
      }


    "convex": "^1.31.6",
    "typescript": "^5",
    "next": "16.1.4",
Was this page helpful?