Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Overview

In this documentlesson, we are going to see how to create and associate jobs from DB in WayfastSQL Server Jobsin Wayfast.

Jobs play an important role as they allow us to schedule timer triggered processes.

What is a Job in Database?

A Job is a container that allows packaging one or more steps in process that need to be scheduled and executed. In other words, we can say that it is a series of query actions that can be performed in certain periods of time.

We can use jobs to define different tasks that can be run one or more times and monitored for success or failure. A job can run on one local server or on multiple remote servers.

How to create a Job in Wayfast?

Under “Database” sectionLet’s go to “Database” at top menu, click on “Jobs” tab.

...

This is job’s Job’s dashboard that will display all the details related.

...

Click on the “New” button to start with the creationand a popup will be displayed.

...

Let’s provide a name and description for the job and then check the “Active” checkbox before clicking “Accept” on “Submit” button.

...

Object is now created on Wayfast. Let’s focus on the “Quantity Steps” and “Quantity Schedulers” columns. Both they are going to indicate what are going to be steps setup for the job and the time-scheduled details respectively.

Let’s focus first on Click on the value of the “Quantity Steps” . Click on the “0” link and automatically a new popup is going to be prompted to display all the steps related to job. In this case, it won’t display any row.

...

Click “New” button again inside the “Job Step” popup and complete the required fields

...

column. As this is a new Job it shows “0”.

A popup is displayed to add or edit job’s steps.

...

Click on the “New” button to add a “Job Step”.

...

After selecting the “Instance” and “Database” information, add the query to execute in as part of the first job step on the job. Make sure that the “Active” checkbox is checked in order to include the step in the job.

...

. The last field is checkbox that allows to activate/deactivate steps during the debugging process.

...

How to schedule a Job?

Schedules allow to set the date & time or the frequency for the job to run.

Now that we have 1 step associated, turn to click on the value of the “Quantity Schedulers” column.

Notice that Scheduling jobs defined the condition or conditions that cause the job to begin running without user interaction. You can schedule a job to run automatically by creating a new schedule for the job.

Click on “0” link

...

A new popup is displayed on the screen to create the job’s scheduler. Click on “New” button

...

Setup the scheduler taking into consideration the following options.

...

The creation popup will be displayed.

...

Before creating the job scheduler, let’s check the following options that Wayfast provides:

Field

Description

Type

This field defines the Execution type. Possible values are:

  • Start Automatically when SQL Server Agent Starts

  • Start whenever the CPUs become Idle

  • Recurring

  • One Time

Frequency occurs

This field defines the Frequency type. Possible values are:

  • Daily

  • Weekly

  • Monthly

Every recurs

This field defines the Number of repetitions based on Frequency Type.

Occurs every FrequencyNumber of times a given event occurs at specified time during a defined period

This field Allows to configure how many times this job is allowed to run.

Starting Frequency

Hour time that it will start the This field defines the Time of the day to trigger job execution

Frequency Daily Ending

Hour time that it will end the execution

...

This field defines the Time of the day to stop job execution in case it hasn’t ended.

Now that we know better the different options, make sure that the job’s scheduler is active before clicking “Accept” on “Submit” button.

...

New scheduler is created and associated to the job previously created.

...

Recap

We The new scheduler will be reflected in the jobs dashboard

...

Recap

In this lesson we learnt how we can setup create a simple job with the steps to be executed by the system in Wayfast. Also how we can simply setup scheduled programs for each of this jobs, define steps and schedule executions. Jobs are crucial to enable features triggered without user interactions like nightly data migrations, data clean up, or any scheduled task.