Skip to main content
Community Jobs allow you to run functions and procedures implemented in a language of your choice on a schedule within Timescale. This allows automatic periodic tasks that are not covered by existing policies and even enhancing existing policies with additional functionality. The following APIs and views allow you to manage the jobs that you create and get details around automatic jobs used by other TimescaleDB functions like continuous aggregate refresh policies and data retention policies. To view the policies that you set or the policies that already exist, see informational views.

Samples

Create a job that runs every hour

Create a procedure and schedule it to run automatically:

Create a job with configuration parameters

Pass configuration to your job using JSONB:

Alter a job schedule

Change when a job runs:

Manually run a job

Trigger a job immediately outside of its schedule:

Delete a job

Remove a job from the scheduler:

Available functions

  • add_job(): add a job to run a function or procedure automatically
  • alter_job(): alter a job that is scheduled to run automatically
  • delete_job(): delete a job from the automatic scheduler
  • run_job(): manually run a job