Jobs¶
Jobs are for scheduled execution of Automation Tasks and Workflows. Jobs can be set to execute on a schedule, at one specific point in time, and/or execute manually (on-demand). Jobs are linked to existing Tasks or Workflows, and allow for custom configuration options. Jobs can be associated with Instances, Servers, or have no association, such as a job for an SSH task.
Jobs allow for scheduled execution of nearly anything as Tasks Types include Bash, Powershell, HTTP/API, Ansible, Chef, Puppet, Groovy, Python, jRuby, Javascript, and library scripts and templates, which can be configured for resource, remote, or local execution targets. If you need something to execute on a schedule, Morpheus Jobs can deliver.
Jobs are configured in the JOBS
tab, and the JOB EXECUTIONS
tab contains Job execution history with result output.
Jobs¶
Role Permissions¶
Provisioning: Jobs
- None: Cannot access
Provisioning > Jobs > Jobs tab
- Read: Can access
Provisioning > Jobs > Jobs tab
but cannot create, edit, or delete Jobs - Full: Full permissions to create, view, edit, and delete Jobs
Provisioning: Job Executions
- None: Cannot access
Provisioning > Jobs > Job Executions tab
- Read: Can access and view
Provisioning > Jobs > Job Executions tab
including job execution history, status, and Job output
Creating Jobs¶
Note
Jobs require existing Tasks or Workflows. See the appropriate section of Morpheus docs for more on creating Tasks and Workflows.
To create a new job:
Navigate to
Provisioning > Jobs
Select + ADD
Enter the following
NAME: Name of the Job in Morpheus JOB TYPE:
Task: Job will execute a selected Task Workflow: Job will execute a selected Workflow
ENABLED: When checked, the Job will run as scheduled
Select NEXT
Configure the Job
- Task Jobs
TASK: Select target Task. If relevant to the Task, Option Type fields will be presented
- SCHEDULE:
Manual: Job is not scheduled but can be executed from
Provisioning > Jobs
and selectingActions > Execute
Date And Time: Job will be executed at one specific point in time and not again (unless rescheduled or executed manually)
Schedule: Select a configured Execution Schedule. Execution Schedules are created in
Provisioning > Automation > EXECUTE SCHEDULING
Note
Morpheus provides two default execution schedules,
Daily at Midnight
andWeekly on Sunday at Midnight
. Any additional schedules were created by a User. Additional schedules can be added inProvisioning > Automation > EXECUTE SCHEDULING
CONTEXT TYPE: Server or Instance
CONTEXT SERVER/INSTANCE: Select the Server or Instance you wish to target with the Job
RUN NOW: When checked, the Job will execute on save regardless of
SCHEDULE
setting.
- Workflow Jobs
WORKFLOW: Select target Workflow. If relevant to the Workflow, Option Type fields will be presented
- SCHEDULE:
Manual: Job is not scheduled but can be executed from
Provisioning > Jobs
and selectingActions > Execute
Date And Time: Job will be executed at one specific point in time and not again (unless rescheduled or executed manually)
Schedule: Select a configured Execution Schedule. Execution Schedules are created in
Provisioning > Automation > EXECUTE SCHEDULING
Note
Morpheus provides two default execution schedules,
Daily at Midnight
andWeekly on Sunday at Midnight
. Any additional schedules were created by a User. Additional schedules can be added inProvisioning > Automation > EXECUTE SCHEDULING
CONTEXT TYPE: Server or Instance
CONTEXT SERVER/INSTANCE: Select the Server or Instance you wish to target with the Job
RUN NOW: When checked, the Job will execute on save regardless of
SCHEDULE
setting.
Select NEXT
Select COMPLETE
Job Executions¶
The Job Executions tab contains execution history of completed Jobs, including any process outputs and error messages. Information included in the Job Executions list include:
- JOB: The name of the executed Job
- DESCRIPTION: When the Job Execution is expanded, the name of each executed task in the Job is listed in this column
- TYPE: The Job type, either Task or Workflow. When a Workflow Job is expanded, each individual Task making up the Workflow is identified as a Task in this column
- START DATE: The date and time the Job Execution kicked off. When expanded, the start date and time of each individual Task are also shown
- ETA/TIME: The time taken for the Job to complete. When expanded, the time to complete each individual Task is also shown
- ERROR: Any errors surfaced are shown here. When expanded, any surfaced errors for individual Tasks are also shown
Click the ⓘ icon at the end of the row for a Job Execution or individual Task (when a Job Execution is expanded) to view the Execution Detail modal which provides the following information:
- Name of the Job or individual Task
- Description
- Start Date
- Created By
- Duration
- Status: Completed, Running, or Failed
- PROCESS OUTPUT: Returned values and outputs from the completed Job
- ERRORS: Any errors surfaced from the completed Job