Skip to content

Task scheduler ​

Right-click a database and choose Task Scheduler to run a query or a backup on an interval.

It only runs while NabuSQL is open

The scheduler is part of the application: it checks every 30 seconds whether a task is due, and runs the ones that are. Close NabuSQL and nothing fires. It is a convenience for a machine you keep the app running on — not a replacement for cron, systemd timers or the Windows Task Scheduler for anything production depends on.

Creating a task ​

FieldMeaning
NameHow the task is listed
Connection and DatabaseWhat it runs against
ActionQuery or Backup
SQLThe statement, for a query task
Output pathThe target file, for a backup task
Interval (minutes)How often it runs — shown as hours when it is 60 or more
EnabledOff pauses the task without deleting it

The task list ​

Each task shows its interval, when it last ran, and the outcome of that run — OK: with the result (rows affected, or where the backup was written) or ERR: with the server's error message. That is where you look when a task quietly stopped working.

Run now executes a task immediately, independently of its schedule. Use it to confirm a new task works rather than waiting for the interval to come round.

How due tasks are decided ​

A task is due when the time since its last run is at least its interval. There is no catch-up: if NabuSQL was closed for two days, the task runs once at the next check, not forty times.

Tasks are stored in scheduled_tasks.json in the application-data directory, so they survive restarts.

Sensible uses ​

  • Refreshing a materialised summary table on a development machine.
  • A periodic backup of a local database you are actively changing.
  • A cleanup DELETE on a scratch database.

For a scheduled production backup, use your operating system's scheduler with mysqldump or pg_dump. A backup that depends on someone leaving a GUI open is not a backup you can rely on.