🎉 Cmdop v1.0 is here! Download now →
Skip to Content
DocsWeb DashboardScheduled Tasks

Scheduled Tasks

Schedule commands to run automatically.

Create Schedule

  1. Go to “Schedules” in sidebar
  2. Click “New Schedule”
  3. Configure the schedule
  4. Save

Schedule Configuration

Basic Info

  • Name - Descriptive name
  • Description - What this schedule does
  • Enabled - Toggle on/off

Command

Enter the command to execute:

apt update && apt upgrade -y

Or multi-line scripts:

#!/bin/bash cd /app git pull npm install pm2 restart all

Target Machine

Select which machine(s) to run on:

  • Single machine
  • Multiple machines
  • Tag-based selection

Timing

Cron Expression

Use cron syntax:

# Every day at 3 AM 0 3 * * * # Every Monday at 9 AM 0 9 * * 1 # Every hour 0 * * * *

Preset Schedules

Quick options:

  • Every hour
  • Every day
  • Every week
  • Every month

One-time

Run once at a specific time:

  • Pick date and time
  • Timezone selection

Notifications

Get notified:

  • On completion
  • On failure only
  • Never

Schedule List

View all schedules with:

  • Name and description
  • Next run time
  • Last run status
  • Quick actions

Filter

Filter by:

  • Status (enabled/disabled)
  • Machine
  • Last run status

Schedule History

View execution history:

  1. Click a schedule
  2. Go to “History” tab
  3. See all past runs

Each run shows:

  • Timestamp
  • Duration
  • Exit code
  • Output (stdout/stderr)

Manage Schedules

Edit

  1. Click schedule
  2. Modify settings
  3. Save changes

Disable

Temporarily disable:

  1. Toggle “Enabled” off
  2. Schedule won’t run until re-enabled

Delete

Remove schedule:

  1. Click “Delete”
  2. Confirm deletion
  3. History is also deleted

Run Now

Manually trigger:

  1. Click “Run Now”
  2. Execution starts immediately
  3. Results appear in history

Best Practices

Naming

Use descriptive names:

  • âś… “Daily backup - production database”
  • ❌ “Schedule 1”

Error Handling

Include error handling:

#!/bin/bash set -e # Exit on error # Your commands here npm run build || echo "Build failed"

Logging

Log output for debugging:

#!/bin/bash exec >> /var/log/schedule.log 2>&1 echo "$(date): Starting backup" # ... commands echo "$(date): Backup complete"

Timeouts

Set appropriate timeouts:

  • Default: 5 minutes
  • Long tasks: up to 1 hour

Dependencies

Check dependencies:

#!/bin/bash if ! command -v npm &> /dev/null; then echo "npm not installed" exit 1 fi npm run build

Scheduled Tasks | Cmdop