Quick Start
Connect to MySQL
Databases
Tables
Adding Fields and Choosing Data Types
Customising Fields
Primary Keys and Indexes
Filter Wizard
Foreign Keys
Import/Export
Queries
Visual Query Builder
Stored Procedure
Data
Manage Users
Backup
Data Transfer
Schedule
Server Monitor
Maintaining your databases/tables
  Working with Schedule
 
Overview

Batch jobs can be created for Backup, Restore Backup, Data Transfer, Import and Export. After a batch job is created, you can execute a series of actions one by one by just executing the batch job. You can also schedule the batch job to execute at a specified time.

 

Creating a batch job/schedule

To create a batch job:

  1. In Navicat's main window, please choose Schedule and click on the "New Batch Job" button
  2. From the available job list, select the jobs you want to be included in the batch job.
  3. You should select the jobs in sequence. To change the sequence of the jobs, press the Move Up or Move Down button.
  4. To execute the jobs immediately, press the Start button.
  5. Click Save or Save As to save the batch job.
  6. After the job is saved, you can set schedule for the job.
  7. To set the schedule of a batch job, you can:
  8. Click on "Schedule setup" button in the Batch Job window
    or
    In Navicat's main window, please choose Schedule and click on the "Setup Schedule" button.

Deleting a batch job

To delete a batch job:

  1. Select the batch job you want to delete.
  2. Click the Delete Batch Job button to delete the batch job.

Deleting a task schedule

To delete a task schedule:

  1. Select the batch job of which you want to delete the schedule.
  2. Click the Delete Task Schedule button to delete the schedule.

OR

  1. Open the batch job.
  2. On the batch job window, select Delete Schedule button.

Schedule Setting Examples

Example 1 : The batch job will be executed at 2:00pm on every Monday, Wednesday and Friday.

Example 2 : The batch job will be executed at 6:30pm every weekday.

Example 3 : The batch job will be executed at 7:30am everyday.

Tips :

- If a field is left without a value, then all the values will be used.

For example, if the "weekday" field is empty, then the system will treat the field to be entered with "0, 1, 2, 3, 4, 5, 6".

- Use commas to seperate values. For example, "0, 1, 3, 6"

- Use hyphen, without spaces to indicate values. For example, "0-4".

Remarks: The pattern follows a crontab entry's format

 

Tips: What is crontab?

For commands that need to be executed repeatedly (e.g., hourly, daily, or weekly), you can use the crontab command. The crontab command creates a crontab file containing commands and instructions for the cron daemon to execute. You can use the crontab command with the following options:

crontab -a filename Install filename as your crontab file. On many systems, this command is executed simply as crontab filename (i.e., without the  -a  option).
crontab -e Edit your crontab file, or create one if it doesn't already exist.
crontab -l Display your crontab file.
crontab -r Remove your crontab file.
crontab -v Display the last time you edited your crontab file. (This option is only available on a few systems.)
crontab -u user Used in conjunction with other options, this option allows you to modify or view the crontab file of user. When available, only administrators can use this option.

Each entry in a crontab file consists of six fields, specifying in the following order:

  minute(s) hour(s) day(s) month(s) weekday(s) command(s)

The fields are separated by spaces or tabs. The first five are integer patterns and the sixth is the command to execute. The following table briefly describes each of the fields:

Field Value Description
minute 0-59 The exact minute that the command sequence executes
hour 0-23 The hour of the day that the command sequence executes
day 1-31 The day of the month that the command sequence executes
month 1-12 The month of the year that the command sequence executes
weekday 0-6 The day of the week that the command sequence executes (Sunday = 0, Monday = 1, Tuesday = 2, and so forth)
command Special The complete sequence of commands to execute. The command string must conform to Bourne shell syntax. Commands, executables (such as scripts), or combinations are acceptable.