Cookies ahead

Our support chat tool "Intercom" would like to collect some more data on you. See the related link for more details.

Docs

Jobs usage

Reviewedbyfl

Markdown ↓

🧰

Background tasks.

Add and configure background jobs to run cron-scheduled tasks or persistent workers on fortrabbit.

Jobs are an optional component, see booking and scaling jobs. After booking, a new settings page becomes available in the dashboard. Here you can add, remove, start, stop and edit jobs.

Job settings

  • Status: active/disabled
  • Job name: A unique name, identifier
  • Command: The command to run, see below
  • Job type: Cron or worker
  • Exit signal: Graceful shutdown - default is usually fine
  • Exit timeout: Time to forceful kill when graceful shutdown is not responding

When choosing the cron type, these additional settings become available:

  • Interval: How and when the job should run, see crontab help
  • Max runtime: How long the job is allowed to run

Command settings

Call commands or scripts via the runtime. Prefix PHP tasks with php and shell scripts with bash:

  • php artisan queue:listen -v
  • bash path/to/my-script.sh

Job types

  • Workers: Non-stop running in the background, event driven triggers
  • Crons: Scheduled at certain times

Written by a human. Review, grammar checks and typo fixes by AI.

AI use & editorial processEdit on GitHub ↗