Skip to content

Commands and schedule ​

Scheduled tasks ​

These run from php artisan schedule:run, which cron calls every minute (see Production deploy). They are defined in routes/console.php.

CommandWhenWhat it does
app:recommendhourlyRefreshes expired recommendations, up to 1000 users per run.
realtime:prunehourlyDeletes realtime events older than an hour from Firebase. Does nothing on other drivers.
sounds:syncdaily, 03:30Adds CC0 sounds from Freesound to the shared library. Skipped while the library is off.
studio:prune-historydaily, 04:00Deletes track versions older than the owner's plan keeps, and stems only those versions used.
payouts:syncevery 30 minutesChecks payouts that have been processing for over 10 minutes with their provider, in case a webhook never came.
ai:sweepevery 10 minutesRefunds AI jobs that stopped without finishing.

Commands you run ​

CommandWhen
php artisan migrate --forceEvery deploy.
php artisan app:sync-rolesEvery deploy. Creates roles and permissions that do not exist yet.
php artisan app:sync-roles <user ids> --roles=<role>To give people roles, for example --roles=admin. Add --remove to take them away. --permissions=<name> works the same way for single permissions.
php artisan webpush:vapidOnce, to create the browser push keys.
php artisan storage:linkOnce, with the local disk.
php artisan queue:restartAfter every deploy and .env change, so workers load the new code.
php artisan reverb:restartAfter a deploy, when Reverb runs on the server.
php artisan cache:forget audio::chromaprintAfter installing or changing FFmpeg.

Run a scheduled task by hand ​

Each scheduled command also works on its own:

bash
php artisan app:recommend 12 34          # only these users
php artisan sounds:sync --force          # even with the library off
php artisan payouts:sync --older-than=0  # every processing payout
php artisan ai:sweep --older-than=40
php artisan realtime:prune --age=3600