Skip to content

Commit

Permalink
Added support for EDB Job Scheduler. pgadmin-org#7098
Browse files Browse the repository at this point in the history
Fixed RESQL test cases

Fixed RESQL test cases
  • Loading branch information
akshay-joshi committed Mar 18, 2024
1 parent f351b10 commit adeed92
Show file tree
Hide file tree
Showing 125 changed files with 7,867 additions and 339 deletions.
108 changes: 108 additions & 0 deletions docs/en_US/dbms_job.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
.. _dbms_job:

*****************
`DBMS Job`:index:
*****************

Use the *DBMS Job* dialog to create a DBMS Job.

.. image:: images/dbms_job_general.png
:alt: DBMS Job dialog general tab
:align: center

Use the fields in the *General* tab to create job:

* Use the *Name* field to add a descriptive name for the job. The name will
be displayed in the *pgAdmin* object explorer.
* Use the *Enabled?* switch to indicate that job should be enabled or disabled.
* Use the *Job Type* field to select the type of the job. Type could be SELF-CONTAINED or PRE-DEFINED.
If the Job Type is Self-Contained you need to specify the action and repeat interval in the Action and Repeat tabs respectively.
If the Job Type is Pre-Defined you need to specify the existing Program and Schedule names in the Pre-Defined tab.
* Store notes about the job in the *Comment* field.

Click the *Action* tab to continue.

.. image:: images/dbms_job_action.png
:alt: DBMS Job dialog action tab
:align: center

Use the *Action* tab to select the action for the job. This tab is only enabled when the job type is 'SELF-CONTAINED'.

* Use the *Type* field to select the type of the job. Type could be PLSQL BLOCK or STORED PROCEDURE.
* Use the *Procedure* field to select an existing procedure that executes when the job is invoked.
* *Number of Arguments* field is read-only and indicates the quantity of arguments necessary for the chosen procedure.

Click the *Code* tab to continue.

.. image:: images/dbms_job_code.png
:alt: DBMS Job dialog code tab
:align: center

* Use the *Code* field to write the code that executes when the job is invoked.
This tab is only enabled when the job type is 'SELF-CONTAINED' and type of the action is set to 'PLSQL BLOCK'.


Click the *Arguments* tab to continue.

.. image:: images/dbms_job_arguments.png
:alt: DBMS Job dialog arguments tab
:align: center

* *Arguments* tab outlines the arguments required by the selected procedure in the 'Action' tab. This tab is only enabled when the job type is 'SELF-CONTAINED'.


Click the *Repeat* tab to continue.

.. image:: images/dbms_job_repeat.png
:alt: DBMS Job dialog repeat tab
:align: center

Use the *Repeat* tab to select the repeat interval for the job. This tab is only enabled when the job type is 'SELF-CONTAINED'.

* Use the calendar selector in the *Start* field to specify the starting date
and time for the job.
* Use the calendar selector in the *End* field to specify the ending date and
time for the job.
* Use the *Frequency* field to select the frequency. Frequency is one of the following:
YEARLY, MONTHLY, WEEKLY, DAILY, HOURLY, MINUTELY.
* Use the *Date* field to select the date on which job will execute.Date is YYYYMMDD.
* Use the *Months* field to select the months in which the job will execute.
* Use the *Week Days* field to select the days on which the job will execute.
* Use the *Month Days* field to select the numeric days on which the job will
execute.
* Use the *Hours* field to select the hour at which the job will execute.
* Use the *Minutes* field to select the minute at which the job will execute.

Click the *Pre-Defined* tab to continue.

.. image:: images/dbms_job_predefined.png
:alt: DBMS Job dialog predefined tab
:align: center

Use the *Pre-Defined* tab to select the existing program and schedule to create the job.
This tab is only enabled when the job type is 'PRE-DEFINED'.

* Use the *Program Name* field to select the existing program.
* Use the *Schedule Name* field to select an existing schedule.


Click the *SQL* tab to continue.

Your entries in the *DBMS Job* dialog generate a SQL command (see an example below).
Use the *SQL* tab for review; revisit or switch tabs to make any changes to the
SQL command.

**Example**

The following is an example of the sql command generated by user selections in
the *DBMS Job* dialog:

.. image:: images/dbms_job_sql.png
:alt: DBMS Job dialog sql tab
:align: center

* Click the *Info* button (i) to access online help.
* Click the *Help* button (?) to access dialog help.
* Click the *Save* button to save work.
* Click the *Close* button to exit without saving work.
* Click the *Reset* button to restore configuration parameters.
45 changes: 45 additions & 0 deletions docs/en_US/dbms_job_scheduler.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
.. _dbms_job_scheduler:

********************************
`Using EDB Job Scheduler`:index:
********************************

In the past versions of EPAS, DBMS_SCHEDULER or DBMS_JOBS required the configuration
of pgAgent, an essential service for their functionality. Maintaining pgAgent in a
production environment is cumbersome. The need for correct configuration, regular updates,
and ensuring the service’s health added complexity.

EPAS 16 revolutionizes job scheduling by eliminating the need for the pgAgent component.
The new version introduces EDB Job Scheduler which is an extension that runs the job scheduler
as a background process for the DBMS_SCHEDULER and DBMS_JOB packages.

The EDB Job Scheduler has a scheduler process that starts when the database cluster starts.
To start the scheduler process, load the EDB Job Scheduler extension using the **shared_preload_libraries**
parameter. After you load the extension, create the extension using the CREATE EXTENSION command.
The database in which you're creating the extension must be listed in the **edb_job_scheduler.database_list**
parameter.

Instructions for configuring the EDB Job Scheduler can be found in the
`Configuring EDB Job Scheduler <https://www.enterprisedb.com/docs/pg_extensions/edb_job_scheduler/configuring/>`_.

.. image:: images/dbms_job_scheduler.png
:alt: DBMS Job Scheduler Object Browser
:align: center

Check the status of all the jobs
********************************

To check the running status of all the jobs select the 'DBMS Job Scheduler' collection node from the object
explorer and select the Properties tab.

.. image:: images/dbms_job_details.png
:alt: DBMS Job Details
:align: center


.. toctree::
:maxdepth: 1

dbms_job
dbms_program
dbms_schedule
71 changes: 71 additions & 0 deletions docs/en_US/dbms_program.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
.. _dbms_program:

*********************
`DBMS Program`:index:
*********************

Use the *DBMS Program* dialog to create a DBMS Program.

.. image:: images/dbms_program_general.png
:alt: DBMS Program dialog general tab
:align: center

Use the fields in the *General* tab to create program:

* Use the *Name* field to add a descriptive name for the program. The name will
be displayed in the *pgAdmin* object explorer.
* Use the *Enabled?* switch to indicate that program should be enabled or disabled.
* Store notes about the program in the *Comment* field.

Click the *Action* tab to continue.

.. image:: images/dbms_program_action.png
:alt: DBMS Program dialog action tab
:align: center

Use the *Action* tab to select the action for the program:

* Use the *Type* field to select the type of the program. Type could be PLSQL BLOCK or STORED PROCEDURE.
* Use the *Procedure* field to select an existing procedure that executes when the program is invoked.
* *Number of Arguments* field is read-only and indicates the quantity of arguments necessary for the chosen procedure.

Click the *Code* tab to continue.

.. image:: images/dbms_program_code.png
:alt: DBMS Program dialog code tab
:align: center

* Use the *Code* field to write the code that executes when the program is invoked.
This tab is only enabled when the type of the program is set to 'PLSQL BLOCK'.


Click the *Arguments* tab to continue.

.. image:: images/dbms_program_arguments.png
:alt: DBMS Program dialog arguments tab
:align: center

* *Arguments* tab is a read-only section that outlines the arguments required by the selected procedure in the 'Action' tab.


Click the *SQL* tab to continue.

Your entries in the *DBMS Program* dialog generate a SQL command (see an example below).
Use the *SQL* tab for review; revisit or switch tabs to make any changes to the
SQL command.

**Example**

The following is an example of the sql command generated by user selections in
the *DBMS Program* dialog:

.. image:: images/dbms_program_sql.png
:alt: DBMS Program dialog sql tab
:align: center

* Click the *Info* button (i) to access online help.
* Click the *Help* button (?) to access dialog help.
* Click the *Save* button to save work.
* Click the *Close* button to exit without saving work.
* Click the *Reset* button to restore configuration parameters.

61 changes: 61 additions & 0 deletions docs/en_US/dbms_schedule.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
.. _dbms_schedule:

**********************
`DBMS Schedule`:index:
**********************

Use the *DBMS Schedule* dialog to create a DBMS Schedule.

.. image:: images/dbms_schedule_general.png
:alt: DBMS Schedule dialog general tab
:align: center

Use the fields in the *General* tab to create schedule:

* Use the *Name* field to add a descriptive name for the schedule. The name will
be displayed in the *pgAdmin* object explorer.
* Store notes about the schedule in the *Comment* field.

Click the *Repeat* tab to continue.

.. image:: images/dbms_schedule_repeat.png
:alt: DBMS Schedule dialog repeat tab
:align: center

Use the *Repeat* tab to select the repeat interval for the schedule:

* Use the calendar selector in the *Start* field to specify the starting date
and time for the schedule.
* Use the calendar selector in the *End* field to specify the ending date and
time for the schedule.
* Use the *Frequency* field to select the frequency. Frequency is one of the following:
YEARLY, MONTHLY, WEEKLY, DAILY, HOURLY, MINUTELY.
* Use the *Date* field to select the date on which schedule will execute.Date is YYYYMMDD.
* Use the *Months* field to select the months in which the schedule will execute.
* Use the *Week Days* field to select the days on which the schedule will execute.
* Use the *Month Days* field to select the numeric days on which the schedule will
execute.
* Use the *Hours* field to select the hour at which the schedule will execute.
* Use the *Minutes* field to select the minute at which the schedule will execute.


Click the *SQL* tab to continue.

Your entries in the *DBMS Schedule* dialog generate a SQL command (see an example below).
Use the *SQL* tab for review; revisit or switch tabs to make any changes to the
SQL command.

**Example**

The following is an example of the sql command generated by user selections in
the *DBMS Schedule* dialog:

.. image:: images/dbms_schedule_sql.png
:alt: DBMS Schedule dialog sql tab
:align: center

* Click the *Info* button (i) to access online help.
* Click the *Help* button (?) to access dialog help.
* Click the *Save* button to save work.
* Click the *Close* button to exit without saving work.
* Click the *Reset* button to restore configuration parameters.
Binary file added docs/en_US/images/dbms_job_action.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/en_US/images/dbms_job_arguments.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/en_US/images/dbms_job_code.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/en_US/images/dbms_job_details.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/en_US/images/dbms_job_general.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/en_US/images/dbms_job_predefined.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/en_US/images/dbms_job_repeat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/en_US/images/dbms_job_scheduler.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/en_US/images/dbms_job_sql.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/en_US/images/dbms_program_action.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/en_US/images/dbms_program_arguments.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/en_US/images/dbms_program_code.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/en_US/images/dbms_program_general.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/en_US/images/dbms_program_sql.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/en_US/images/dbms_schedule_general.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/en_US/images/dbms_schedule_repeat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/en_US/images/dbms_schedule_sql.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/en_US/managing_database_objects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ node, and select *Create Cast...*
:maxdepth: 1

cast_dialog
dbms_job_scheduler
collation_dialog
domain_dialog
domain_constraint_dialog
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ def register(self, app, options):
from .subscriptions import blueprint as module
self.submodules.append(module)

from .dbms_job_scheduler import blueprint as module
self.submodules.append(module)

super().register(app, options)


Expand Down
Loading

0 comments on commit adeed92

Please sign in to comment.