Jobs
Learn about job definitions and execution
Jobs are the fundamental building blocks in Schedo.dev. A job represents a task that needs to be executed at specific times or intervals.
Jobs
Job Structure
A job in Schedo.dev consists of three main components:
Job Identifier
Every job requires a unique identifier. This ID is used to:
- Track job executions
- Reference the job in the system
- Configure job-specific settings
Job Context
The job handler receives a context object (ctx
) containing execution information:
Job Return Values
Jobs can return a string that will be stored as the execution result:
Job Lifecycle
Jobs in Schedo.dev follow a simple lifecycle:
- Scheduled: Job is waiting for its next execution time
- Running: Job is currently executing
- Completed: Job finished successfully
- Failed: Job encountered an error
Job Configuration
Jobs can be configured with basic options:
Best Practices
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
Next Steps
Dashboard Overview
The dashboard provides a comprehensive view of your job statistics and current state:
The dashboard shows:
- Total Jobs: Total number of jobs defined
- Active Jobs: Number of jobs that are active and running
- Failed Jobs: Number of job definitions with failed executions
Job Details
Each job has detailed parameters and execution statistics:
Key information includes:
- Schedule settings
- Job timeout
- Creation date
- Last and next run times
- Execution history graph showing average execution times