Skip to content
Hoist

Commands & scheduled jobs

Open a project's Commands page to run a command against the live app, once or on a schedule. Each run gets a fresh container from the live deployment's image, with its environment variables, on the project's server. Nothing is added to your running containers.

You need something deployed first. Static sites have no app to run commands in.

Running a command

Type a command, such as php artisan migrate:status or python manage.py showmigrations, and choose Run. The output streams in as it runs, and you can Cancel it at any time.

  • A command is stopped after 15 minutes.
  • Interactive commands, such as a shell or tinker without --execute, won't work: there's no keyboard attached.
  • Commands can change live data. Every run is recorded in the audit log, with who ran it.

Recent commands lists the last runs. Open one to see its output again, or choose Run again.

Scheduled jobs

A scheduled job runs a command on a schedule, like cron. Use one to clear caches, send digests or prune old records.

Choose Add a scheduled job, give it a name and a command, and pick when it runs: every minute, every 5 or 15 minutes, hourly, daily, weekly, monthly, or any cron expression (minute hour day month weekday). Times are in the time zone of the person who created the job, shown under the schedule.

  • A run is skipped while the previous one is still going.
  • Pause a job to stop it without deleting it, and Resume it later.
  • Run a job straight away with its play button.
  • Each project can have up to 20 jobs.

Each job shows its next run and how its last one went: succeeded, failed or skipped. To hear when a job fails, and when it recovers, add a notification channel with the A scheduled job fails or recovers event. See Alerts & notifications.

Laravel's scheduler

For Laravel, Hoist already runs schedule:work as a process, so jobs in routes/console.php run without a scheduled job here. Use scheduled jobs for commands that aren't in your app's own schedule, or for apps without a scheduler.

Who can run commands

Developers, admins and owners can run commands and manage scheduled jobs. Viewers can see the history but not run anything.