Automate MongoDB tasks
Tasks help you automate repetitive MongoDB jobs by allowing you to configure, save, and schedule tasks and run them as needed.
Scheduling tasks allows teams to work together more efficiently in MongoDB workflows, for example by coordinating tasks that use the same data sets. Automate routine operations such as imports and exports that occur on a regular basis. Schedule resource-intensive operations, for example large-scale imports, to run when system usage is lower to minimize the impact on database performance.
Try Studio 3T for freeAfter saving your frequently-run jobs, you can run them on-demand using Tasks, or run them automatically by scheduling them. What you can automate or schedule with Tasks depends on your Studio 3T edition.
- Import Wizard (Basic, Pro and Ultimate)
- Export Wizard (Basic, Pro and Ultimate)
- Data Compare & Sync (Pro and Ultimate only)
- Reschema (Ultimate only)
- Data Masking (Ultimate only)
- SQL Migration (Ultimate only)
- IntelliShell Script Tasks (Basic, Pro and Ultimate)
Open Tasks
Go to the Global Toolbar and click on Tasks. This opens a Tasks tab, which provides an overview of all previously-saved tasks.
Create a task
To create a task, click on the New Task button.
This opens the New Task dialog with all the possible types of tasks you can create:
Select the task type and click OK. The appropriate tab opens – depending on the task type – where you can configure and save the task.
Follow the links below to learn more about the task types:
- Import Wizard
- SQL to MongoDB Migration
- MongoDB to SQL Migration
- Data Compare and Sync
- Export Wizard
- Data Masking
- Reschema
- IntelliShell
Save or load a task
At the top of each task tab, there is a series of buttons:
- Load task – Loads the configuration of an existing task.
- Save task – Saves the task with its current name, or prompts you to name it, if it hasn’t been saved yet.
- Save task as – Prompts you to name the task and save it.
- Schedule – Sets a schedule for automated running of the task.
- Run – Runs the current configuration.
After saving the task, it is displayed in the Tasks tab.
Run a task
- Select the required tasks in the Tasks tab.
- Click the Run button, or right-click the task(s) and select Run.
You can track the progress of import jobs in the Operations sidebar. For Data Compare & Sync jobs, a Comparison Results tab automatically opens.
Find a task
You can search for and filter your saved tasks using the search bar at the top of the Tasks tab.
Edit a task
- Select the required tasks in the Tasks tab.
- Click the Edit button, or right-click the task(s) and select Edit. This opens the corresponding tab, ready for you to edit the task.
Duplicate a task
Duplicating a task makes a copy of the task ready for you to modify.
- Select the required tasks in the Tasks tab.
- Click the Duplicate button, or right-click the task(s) and select Duplicate. A copy is created for each selected task.
Delete a task
- Select the required tasks in the Tasks tab.
- Click the Delete button, or right-click the task(s) and select Delete.
Schedule MongoDB tasks
You can run tasks on demand or you can schedule jobs to be run automatically at specified times.
To schedule a task, go to the Global Toolbar and click on Tasks.
On the Tasks tab, right-click in the Schedule cell of the target task, and select Schedule. This cell is initially empty, meaning that the task hasn’t been scheduled yet.
The Task schedule editor opens, which allows you to schedule the task.
Setting the Recurrence field allows you to select a range of scheduling options. Whatever you select in the editor is explained in the Schedule Summary:
Once
You can choose to run the task once at a set time in the future:
Daily
Daily at a specific time:
You can also optionally set a date for when this schedule stops being run.
Every
Runs the task every number of minutes or hours specified in the Time interval field.
You can also specify a date and time when this repeated run starts and optionally a date and time when it stops.
Weekly
Runs the task on specific days of the week (not just once a week) at a specified time of the day.
You can also specify a date when this weekly run starts and optionally a date when it stops.
Monthly
Runs tasks on specific days of the month (not just once a month) and at a particular time of the day.
You can also specify a date when this monthly schedule starts and optionally a date when it stops.
Custom
Combining all the above scheduling options, the Custom recurrence allows for runs on days of the week, or of the month, or both. When scheduled, the task can be run once or repeated at a particular hourly/minute rate over a period of time during that day.
The custom schedule can also be started on a specific date and optionally be stopped on a different date.
Configure the schedule as desired and click Save.