Cronjobs

Scheduled tasks
at server and app level

Server-level and application-level scheduling for shell, Python, and custom commands. Basic presets or advanced cron expressions. Failures roll up to monitoring — cron's silent failures are surfaced.

New Cronjob
Create

Job Name

nightly-backup

Type

ShellPythonCustom

Command

/usr/local/bin/backup.sh --full

Schedule

Every Day · 02:00

2

Scopes (server & app)

3

Command types (Shell, Python, Custom)

2

Schedule modes (Basic & Advanced)

0

Silent failures

Scheduling

Two scopes, same form

Server-level jobs handle housekeeping and cross-app tasks. Application-level jobs default their working directory to the app root and migrate/clone with that application automatically.

Server Cronjobs

Whole server scope — housekeeping and cross-app tasks

Application Cronjobs

One app scope — defaults to app root, migrates with the app

Three Command Types

Shell, Python, and Custom commands

Flexible Scheduling

Basic presets or advanced cron expressions

Scheduling

Flexible scheduling — basic or advanced

Choose from basic presets or use advanced cron fields for exact timing a preset can't express. Pre-save validation blocks jobs that wouldn't run.

  • Basic presets: Every Hour, Day, Week, Month
  • Advanced: raw cron fields (minute, hour, month, weekday)
  • Job Name, Type, Command, Schedule, Working Directory
  • Pre-save validation — blocks missing fields and invalid schedules
Schedule

Basic Presets

Every Hour
Every Day
Every Week
Every Month

Advanced — Cron Fields

Min

0

Hour

2

Day

*

Mon

*

Wk

*

0 2 * * * — valid schedule
App-Level

Application cronjobs that migrate with the app

Application-level jobs default their working directory to the app root and migrate/clone with that application automatically. Put a job on the application it belongs to — it migrates with the app.

  • Application Cronjob — one app scope, defaults to app root
  • Working directory defaults to app root
  • Migrates and clones with the application automatically
  • Server Cronjob — whole server scope, set working directory explicitly
Application Cronjobs

api-gateway

/var/www/api

Active

web-frontend

/var/www/web

Active

worker-queue

/var/www/worker

Stopped

analytics

/var/www/analytics

Active

Working directory defaults to app root · migrates with app

Monitoring

Lifecycle & monitoring — no silent failures

Start/Stop without deleting the definition — useful for suspending a suspect job. Failures roll up into Monitoring → Cron Job Failures, because cron is silent by nature.

  • Status: Active, Stopped, Unknown
  • Start/Stop toggle without deleting the definition
  • Search by job name, bulk actions with guards
  • Failures roll up to the Monitoring dashboard
Cronjob Lifecycle

nightly-backup

Active

log-rotate

Active

db-cleanup

Stopped

Cron Job Failures

db-cleanup failed 3× — rolled up to Monitoring

Guidance

Built-in operational guidance

The panel surfaces the most common cron pitfalls directly: use absolute paths (cron runs with a minimal environment), set Working Directory explicitly, redirect output, and stagger heavy jobs.

  • Use absolute paths — no PATH, no aliases under cron
  • Set Working Directory when relative paths are involved
  • Redirect output so failures leave a trace
  • Stagger heavy jobs so they don't compete for disk/CPU
cron — common pitfalls

# Pitfall: relative paths

$ ./backup.sh

→ not found — cron has no PATH

# Fix: absolute paths

/usr/local/bin/backup.sh

# Pitfall: silent failures

$ /usr/local/bin/backup.sh

→ no output, no trace

# Fix: redirect output

/usr/local/bin/backup.sh >> /var/log/backup.log 2>&1

$

Cron Pitfalls

Cron is silent — we surface the failures

Cron runs with a minimal environment — no PATH, no aliases, no shell profile. The panel surfaces the most common pitfalls directly, so you don't discover them at 3am when a job silently stops running.

Absolute paths — cron has no PATH or aliases

Redirect output so failures leave a trace

Stagger heavy jobs to avoid resource contention

Common Pitfalls
Top mistakes
Relative pathsUse absolute paths
No output redirectRedirect to log file
Jobs overlapStagger heavy jobs
Missing env varsSet in command directly
Keep building

Everything around your cronjobs

Pair cronjob scheduling with the tools that keep your applications fast, secure, and resilient.

FAQ

Frequently Asked Questions

Everything you need to know about this service.

Contact Support

Server cronjobs run at the whole-server scope for housekeeping and cross-app tasks. Application cronjobs run at the app scope with the working directory defaulting to app root, and they migrate/clone with that application automatically.

SharkCluster supports Shell, Python, and Custom command types for both server-level and application-level scheduled tasks, with basic presets or advanced cron expressions.

Start your journey today

Ready to take control
of your hosting?

Deploy servers, run self-hosted business apps, and keep your data on your own VPS — with a dedicated DevOps manager by your side.

No lock-in contracts
No credit card required
Dedicated DevOps manager