Created
November 4, 2016 21:26
-
-
Save sebastianwebber/763e5fc88549d1d2a3708a1e2b0eb216 to your computer and use it in GitHub Desktop.
List PGAgent next jobs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
pga_job.jobname as job_name, | |
pga_jobstep.jstdbname as database_name, | |
pgagent.pga_next_schedule( | |
pga_schedule.jscid, | |
pga_schedule.jscstart, | |
pga_schedule.jscend, | |
pga_schedule.jscminutes, | |
pga_schedule.jschours, | |
pga_schedule.jscweekdays, | |
pga_schedule.jscmonthdays, | |
pga_schedule.jscmonths) as next_run | |
FROM | |
pgagent.pga_job | |
JOIN | |
pgagent.pga_schedule ON pga_schedule.jscjobid = pga_job.jobid | |
JOIN | |
pgagent.pga_jobstep ON pga_jobstep.jstjobid = pga_job.jobid; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment