hubio-sync schedule

Manage scheduled migration jobs.

Synopsis

hubio-sync schedule <subcommand> [flags]

Description

Schedules allow you to automate migrations to run at specified intervals using cron expressions. The scheduler daemon must be running for schedules to execute.

Subcommands

SubcommandDescription
listList all schedules
createCreate a new schedule
deleteDelete a schedule
enableEnable a schedule
disableDisable a schedule

hubio-sync schedule list

List all configured schedules.

Synopsis

hubio-sync schedule list [--json]

Flags

FlagDescription
--jsonOutput in JSON format

Example

hubio-sync schedule list

Output:

Schedules
=========

  daily-backup [sch_1701619200000000000]
    Source: src_mysql123 → Destination: dst_s3789
    Cron: 0 2 * * *, Mode: initial, Status: enabled

  hourly-sync [sch_1701619200000000001]
    Source: src_pg456 → Destination: dst_snowflake
    Cron: 0 * * * *, Mode: incremental, Status: enabled

hubio-sync schedule create

Create a new scheduled migration job.

Synopsis

hubio-sync schedule create --name <name> --source <source> --destination <dest> --cron <expression> [flags]

Flags

FlagShortRequiredDescription
--name-nYesSchedule name
--source-sYesSource configuration name or ID
--destination-dYesDestination configuration name or ID
--cron-cYesCron expression
--mode-mNoMode: initial or incremental (default: initial)

Cron Expression Format

┌───────────── minute (0 - 59)
│ ┌───────────── hour (0 - 23)
│ │ ┌───────────── day of month (1 - 31)
│ │ │ ┌───────────── month (1 - 12)
│ │ │ │ ┌───────────── day of week (0 - 6, Sunday = 0)
* * * * *

Common Cron Examples

ExpressionDescription
*/15 * * * *Every 15 minutes
0 * * * *Every hour
0 2 * * *Daily at 2 AM
0 0 * * 0Weekly on Sunday at midnight
0 0 1 * *Monthly on the 1st

Examples

# Daily backup at 2 AM
hubio-sync schedule create \
  -n daily-backup \
  -s mysql-prod \
  -d s3-archive \
  -c "0 2 * * *"

Output:

✓ Schedule 'daily-backup' created
  ID: sch_1701619200000000000
  Source: src_mysql123 → Destination: dst_s3789
  Cron: 0 2 * * *, Mode: initial

Start the scheduler to run scheduled jobs:
  hubio-sync serve
# Hourly incremental sync
hubio-sync schedule create \
  -n hourly-sync \
  -s postgres-db \
  -d snowflake \
  -c "0 * * * *" \
  -m incremental

hubio-sync schedule delete

Delete a scheduled job.

Synopsis

hubio-sync schedule delete <name-or-id>

Example

hubio-sync schedule delete daily-backup

Output:

Deleting schedule: daily-backup [sch_1701619200000000000]
✓ Schedule deleted

hubio-sync schedule enable

Enable a disabled schedule.

Synopsis

hubio-sync schedule enable <name-or-id>

Example

hubio-sync schedule enable weekly-report

Output:

✓ Schedule 'weekly-report' enabled

hubio-sync schedule disable

Disable a schedule without deleting it.

Synopsis

hubio-sync schedule disable <name-or-id>

Example

hubio-sync schedule disable weekly-report

Output:

✓ Schedule 'weekly-report' disabled

Running Schedules

Schedules are executed by the scheduler daemon. Start the daemon to run scheduled jobs:

# Interactive mode
hubio-sync serve

# Daemon mode
hubio-sync serve --daemon

# As system service
hubio-sync service install --start

Configuration Storage

Schedules are stored in the main configuration file alongside sources and destinations:

PlatformPath
macOS~/.config/hubio-sync/config.json
Linux~/.config/hubio-sync/config.json
Windows%APPDATA%\hubio-sync\config.json

See Also