schedo.defineJob( 'configurable-job', '0 0 * * *', async (ctx) => { // Job implementation }, withTimeout(seconds), // optinal execution timeout, default to 5 seconds withMetadata({ owner: "analytics-team", priority: "high" }), // optional metadata to be passed to the job withBlocking(true), // prevents another job instance from execution in case there is an existing one running);
While using Schedo SDK, we wrap job handler and track errors under the hood. Whenever your job execution will fail, you will see
an error in the dashboard.
Error Handling
Copy
async (ctx) => { throw new Error('Failed to process users')}