Configuration File

Cron Jobs

The [[cronjobs]] section is used to define scheduled tasks that run at a specific time or interval.

Each cron job is defined as a separate [[cronjobs]] table.

# Configuration file with a cronjobs section
app = 'myapp'

[[cronjobs]]
  name = 'scheduler'
  schedule = '* * * * *'
  command = 'php artisan schedule:run'

name

The name of the cron job is a required field that uniquely identifies it. It must adhere to the following rules:

  • Uniqueness: Each cron job name must be unique within the [[cronjobs]] list in your deckrun.toml file. Duplicate names will cause a validation error.
  • Formatting: The name must consist of lowercase alphanumeric characters and dashes.
  • Length: The name must be between 3 and 63 characters long.

schedule

The schedule for the cron job in cron format. This is a required field.

command

The command to execute. This is a required field.

Sizing your cron job

You can define the CPU and memory for a cron job using either pre-defined sizes or custom resource allocation. The options and validation rules are the same as for processes.

For detailed information on pre-defined sizes and custom resource allocation, please refer to the Sizing your process documentation.

Previous
Processes