Alter an existing job by using alter_job. You can change both the config and the schedule on which the job runs. Delete a job by using delete_job.

Note

To alter or delete a job, you need to know its job_id. Find the job_id by querying the timescaledb_information.jobs table.

SELECT * FROM timescaledb_information.jobs;

To replace the entire JSON config for a job, call alter_job with a new config object. For example, replace the JSON config for a job with id 1000:

SELECT alter_job(1000, config => '{"hypertable":"metrics"}');

To turn off automatic scheduling of a job, call alter_job and set scheduled to false. You can still run the job manually with run_job. For example, turn off the scheduling for a job with id 1000:

SELECT alter_job(1000, scheduled => false);

To re-enable automatic scheduling of a job, call alter_job and set scheduled to true. For example, re-enable scheduling for a job with id 1000:

SELECT alter_job(1000, scheduled => true);

Delete a job from the automation framework with delete_job. For example, to delete a job with id 1000:

SELECT delete_job(1000);

Keywords

Found an issue on this page?Report an issue or Edit this page in GitHub.