pgAgent docs. Fixes #1824
parent
9893b1bee4
commit
8b2832bbc7
Binary file not shown.
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
Binary file not shown.
After Width: | Height: | Size: 74 KiB |
|
@ -22,6 +22,7 @@ Contents:
|
||||||
developer_tools
|
developer_tools
|
||||||
deployment
|
deployment
|
||||||
contributions
|
contributions
|
||||||
|
pgagent
|
||||||
licence
|
licence
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
pgAgent
|
pgAgent
|
||||||
=======
|
=======
|
||||||
|
|
||||||
pgAgent is a job scheduling agent for Postgres databases, capable of running multi-step batch/shell and SQL tasks on complex schedules.
|
pgAgent is a job scheduling agent for Postgres databases, capable of running multi-step batch or shell scripts and SQL tasks on complex schedules.
|
||||||
|
|
||||||
pgAgent is distributed independently of pgAdmin. You can download pgAgent from the `download area <http://www.pgadmin.org/download>`_ of the pgAdmin website.
|
pgAgent is distributed independently of pgAdmin. You can download pgAgent from the `download area <http://www.pgadmin.org/download>`_ of the pgAdmin website.
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
.. _pgagent_jobs:
|
.. _pgagent_jobs:
|
||||||
|
|
||||||
|
|
||||||
*********************
|
*******************************
|
||||||
`pgAgent Jobs`:index:
|
`Creating a pgAgent Job`:index:
|
||||||
*********************
|
*******************************
|
||||||
|
|
||||||
pgAgent is a scheduling agent that runs and manages jobs; each job consists of steps and schedules.
|
pgAgent is a scheduling agent that runs and manages jobs; each job consists of steps and schedules.
|
||||||
|
|
||||||
To create or manage a job, use the pgAdmin tree control to browse to the server on which the pgAgent database objects were created. The tree control will display a *pgAgent Jobs* node, under which currently defined jobs are displayed. To change the properties of an existing job, right click on the name of the job, and select *Properties*. To add a new job, right click on the *pgAgent Jobs* node, and select *Create pgAgent Job...* from the context menu.
|
To create or manage a job, use the pgAdmin tree control to browse to the server on which the pgAgent database objects were created. The tree control will display a *pgAgent Jobs* node, under which currently defined jobs are displayed. To add a new job, right click on the *pgAgent Jobs* node, and select *Create pgAgent Job...* from the context menu.
|
||||||
|
|
||||||
When the pgAgent dialog opens, use the tabs on the *pgAgent Job* dialog to define the steps and schedule that make up a pgAgent job.
|
When the pgAgent dialog opens, use the tabs on the *pgAgent Job* dialog to define the steps and schedule that make up a pgAgent job.
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ Use fields on the step definition dialog to define the step:
|
||||||
Use the context-sensitive field on the step definition dialog's *Code* tab to provide the SQL code or batch script that will be executed during the step:
|
Use the context-sensitive field on the step definition dialog's *Code* tab to provide the SQL code or batch script that will be executed during the step:
|
||||||
|
|
||||||
* If the step invokes SQL code, provide one or more SQL statements in the *SQL query* field.
|
* If the step invokes SQL code, provide one or more SQL statements in the *SQL query* field.
|
||||||
* If the step performs a batch script, provide the script in the *Script* field. If you are running on a Windows server, standard batch file syntax must be used. When running on a *nix server, any shell script may be used, provided that a suitable interpreter is specified on the first line (e.g. *#!/bin/sh*).
|
* If the step performs a batch script, provide the script in the *Script* field. If you are running on a Windows server, standard batch file syntax must be used. When running on a Linux server, any shell script may be used, provided that a suitable interpreter is specified on the first line (e.g. *#!/bin/sh*).
|
||||||
|
|
||||||
When you've provided all of the information required by the step, click the compose icon to close the step definition dialog. Click the add icon (+) to add each additional step, or select the *Schedules* tab to define the job schedule.
|
When you've provided all of the information required by the step, click the compose icon to close the step definition dialog. Click the add icon (+) to add each additional step, or select the *Schedules* tab to define the job schedule.
|
||||||
|
|
||||||
|
@ -111,6 +111,11 @@ When you've finished defining the schedule, you can use the *SQL* tab to review
|
||||||
|
|
||||||
.. image:: images/pgagent_sql.png
|
.. image:: images/pgagent_sql.png
|
||||||
|
|
||||||
The *Properties* tab in the main pgAdmin window will display the details of the selected job, and the Statistics tab will show the details of each run of the job.
|
Click the *Save* button to save the job definition, or *Cancel* to exit the job without saving. Use the *Reset* button to remove your unsaved entries from the dialog.
|
||||||
|
|
||||||
|
After saving a job, the job will be listed under the *pgAgent Jobs* node of the pgAdmin tree control of the server on which it was defined. The *Properties* tab in the main pgAdmin window will display a high-level overview of the selected job, and the *Statistics* tab will show the details of each run of the job.
|
||||||
|
|
||||||
.. image:: images/pgagent_properties.png
|
.. image:: images/pgagent_properties.png
|
||||||
|
|
||||||
|
To modify an existing job or to review detailed information about a job, right-click on a job name, and select *Properties* from the context menu.
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ pgAgent is a scheduling agent that runs and manages jobs; each job consists of o
|
||||||
|
|
||||||
A step may be a series of SQL statements or an operating system batch/shell script. Each step in a given job is executed when the previous step completes, in alphanumeric order by name. Switches on the *pgAgent Job* dialog (accessed through the *Properties* context menu) allow you to modify a job, enabling or disabling individual steps as needed.
|
A step may be a series of SQL statements or an operating system batch/shell script. Each step in a given job is executed when the previous step completes, in alphanumeric order by name. Switches on the *pgAgent Job* dialog (accessed through the *Properties* context menu) allow you to modify a job, enabling or disabling individual steps as needed.
|
||||||
|
|
||||||
Each Job is executed according to one or more schedules. Each time the job or any of its schedules are altered, the next runtime of the job is re-calculated. Each instance of pgAgent periodically polls the database for jobs with the next runtime value in the past. By polling at least once every minute, all jobs will normally start within one minute of the specified start time. If no pgAgent instance is running at the next runtime of a job, it will run as soon as pgAgent is next started, following which it will return to the normal schedule.
|
Each job is executed according to one or more schedules. Each time the job or any of its schedules are altered, the next runtime of the job is re-calculated. Each instance of pgAgent periodically polls the database for jobs with the next runtime value in the past. By polling at least once every minute, all jobs will normally start within one minute of the specified start time. If no pgAgent instance is running at the next runtime of a job, it will run as soon as pgAgent is next started, following which it will return to the normal schedule.
|
||||||
|
|
||||||
When you highlight the name of a defined job in the pgAdmin tree control, the *Properties* tab of the main pgAdmin window will display details about the job, and the *Statistics* tab will display details about the job's execution.
|
When you highlight the name of a defined job in the pgAdmin tree control, the *Properties* tab of the main pgAdmin window will display details about the job, and the *Statistics* tab will display details about the job's execution.
|
||||||
|
|
||||||
|
|
|
@ -183,6 +183,7 @@ function($, _, S, pgAdmin, moment, pgBrowser, Alertify, Backform) {
|
||||||
pgBrowser.Nodes['pga_schedule'] = pgBrowser.Node.extend({
|
pgBrowser.Nodes['pga_schedule'] = pgBrowser.Node.extend({
|
||||||
parent_type: 'pga_job',
|
parent_type: 'pga_job',
|
||||||
type: 'pga_schedule',
|
type: 'pga_schedule',
|
||||||
|
dialogHelp: '{{ url_for('help.static', filename='pgagent_jobs.html') }}',
|
||||||
hasSQL: false,
|
hasSQL: false,
|
||||||
hasDepends: false,
|
hasDepends: false,
|
||||||
hasStatistics: false,
|
hasStatistics: false,
|
||||||
|
|
|
@ -22,6 +22,7 @@ function($, _, S, pgAdmin, pgBrowser, Alertify, Backform) {
|
||||||
pgBrowser.Nodes['pga_jobstep'] = pgBrowser.Node.extend({
|
pgBrowser.Nodes['pga_jobstep'] = pgBrowser.Node.extend({
|
||||||
parent_type: 'pga_job',
|
parent_type: 'pga_job',
|
||||||
type: 'pga_jobstep',
|
type: 'pga_jobstep',
|
||||||
|
dialogHelp: '{{ url_for('help.static', filename='pgagent_jobs.html') }}',
|
||||||
hasSQL: true,
|
hasSQL: true,
|
||||||
hasDepends: false,
|
hasDepends: false,
|
||||||
hasStatistics: true,
|
hasStatistics: true,
|
||||||
|
|
|
@ -21,6 +21,7 @@ function($, _, S, pgAdmin, pgBrowser, Alertify) {
|
||||||
pgBrowser.Nodes['pga_job'] = pgBrowser.Node.extend({
|
pgBrowser.Nodes['pga_job'] = pgBrowser.Node.extend({
|
||||||
parent_type: 'server',
|
parent_type: 'server',
|
||||||
type: 'pga_job',
|
type: 'pga_job',
|
||||||
|
dialogHelp: '{{ url_for('help.static', filename='pgagent_jobs.html') }}',
|
||||||
hasSQL: true,
|
hasSQL: true,
|
||||||
hasDepends: false,
|
hasDepends: false,
|
||||||
hasStatistics: true,
|
hasStatistics: true,
|
||||||
|
|
Loading…
Reference in New Issue