Try Studio 3T for Free
  1. Knowledge Base
  2. Job Automation & Scheduling
  3. Tasks and Task Scheduler for MongoDB

Tasks and Task Scheduler for MongoDB

Tasks lets you configure and save frequently-run imports, exports, data comparisons, migrations, Reschema, and data masking jobs so you can later run them with one click.

Task Scheduler takes it up a notch by adding a scheduling functionality so they are run automatically, whenever you need.

Try both today.

Automate MongoDB tasks

Tasks and Task Scheduler help you automate repetitive MongoDB jobs by allowing you to configure, save, and schedule tasks and run them as needed.

After saving your frequently-run jobs, you can run them on-demand using Tasks, or run them automatically using Task Scheduler. 

Tasks and Task Scheduler currently support these tasks. What you can automate or schedule will depend on your Studio 3T edition.

  1. Import Wizard (all Studio 3T editions)
  2. Export Wizard (all Studio 3T editions)
  3. Data Compare & Sync (Pro and Enterprise only)
  4. Reschema (Pro and Enterprise only)
  5. Data Masking (Enterprise only)
  6. SQL Migration (Enterprise only)

Studio 3T must be running at the scheduled time in order for any scheduled task to run.

But with Server 3T, it is now possible to run on-demand or scheduled exports and SQL migrations on a remote server, so you don’t need Studio 3T to run on your local machine. Learn more about Server 3T here.

Download the latest Studio 3T version and automate your first task.

Open Tasks

  1. Go to the Studio 3T global toolbar and click on the Tasks button.
  2. This will open up the Tasks dialog, which provides an overview of all previously-saved tasks.

Click on Tasks on the toolbar

Create a task

To create a task, click on the New Task button. This will open the New Task dialog:

Create a new task by clicking on New Task

The dialog displays all the possible types of tasks you can create:

List of supported options for Tasks

Select the task type and click OK. This will close the current dialogs and trigger the appropriate tab – depending on the task type – where you can continue to configure and save the task.

Here are the links to the relevant documentation:

Save a task

On top of each task tab is a toolbar with three buttons:

Choose one of three actions from the toolbar

  • Save task – Saves the task with its current name, or prompts the user to name it if it wasn’t saved yet.
  • Save task as – Prompts the user to name the task and save it.
  • Execute task – Executes the current configuration.

It is not possible to save or execute a partially configured task.

After saving the task, it will be visible in the Task Overview dialog:

Get an overview of your tasks

Execute a task

  1. Select any number of tasks in the Task Overview dialog.
  2. Click the Execute button, or right-click on the task(s) and choose Execute. Studio 3T will then execute the task with the saved configuration.

You can track the progress of import jobs in the Operations panel. For Data Compare & Sync jobs, a Comparison Results tab will automatically open.

Edit a task

  1. Select any number of entries in the Task Overview dialog.
  2. Click the Edit button, or right-click on the task(s) and choose Edit. This will bring up the corresponding tab, filled with the saved configuration.

Edit a MongoDB task

Clone a task

  1. Choose any number of entries in the Task Overview dialog.
  2. Click the Clone button, or right-click on the task(s) and select Clone. A copy will be created for each selected Task, under the name “Copy of <task name>”.

Clone a MongoDB task

Delete a task

  1. Choose any number of tasks in the Task Overview dialog.
  2. Click on the Delete button, or right-click on the task(s) and press Delete. The user will asked to confirm the deletion, after which the tasks will be deleted.

Delete a MongoDB task

Schedule MongoDB tasks

Task Scheduler is the complementary feature to Tasks, which lets you schedule jobs to be executed automatically at specified times.

In order to trigger the scheduled task, Studio 3T must be running at the scheduled time, otherwise the task won’t be run.

If you’re scheduling SQL migrations, it is possible to run them on a remote server with Server 3T. Learn more about it here.

To schedule a task, open the Task Overview dialog.

Double-click in the Schedule cell of the target task. This cell is initially empty, meaning that the task hasn’t been scheduled.

This will trigger the Task schedule editor, which allows you to schedule the task. You can choose to run the task everyday:

Execute every day
Once at the specified time:

Execute once at the specified time
Or regularly on the days and time you specify:

Execute using "every"

Configure the schedule as desired and click Save. The task is now scheduled to run:

Task schedule overview

Run MongoDB tasks on a remote server

With the release of Server 3T, it’s now possible to run on-demand and scheduled exports and migrations on a remote server.

Learn more about how you can run tasks remotely and try it for free here.

Check out Studio 3T’s other time-saving features:

  • SQL Query – Use SQL to query MongoDB and see how it translates to the MongoDB query language
  • Import Wizard + Export Wizard – Import/export in various formats, without writing a single command
  • Aggregation Editor – Write MongoDB aggregation queries in stages

Updated on March 23, 2021

Was this article helpful?

Related Articles