Console commands
JournalPHP console commands run the platform's background tasks; most of them are started by the scheduler automatically.
Overview
JournalPHP uses Artisan, the Laravel console. Commands run inside the app container:
bash
# local environment
docker compose exec app php artisan <command>
# production
docker compose -f docker-compose.prod.yml exec app php artisan <command>JournalPHP commands
| Command | Purpose |
|---|---|
users:unban | Deletes expired bans: platform bans and topic bans |
users:purge-deleted | Permanently deletes accounts whose recovery period has ended |
rating:update-place-history | Queues recalculation of places in the author rating |
rating:save-monthly-places {--month=} | Saves the final places of the monthly top authors and top commenters. Previous month by default, --month=2026-08 for a given month |
achievements:award {--full} | Awards achievements to users with new activity since the last run. With --full checks all users and all rules |
topics:update-activity-score | Recalculates topic activity over 7 days |
post-counts:refresh | Recalculates the counters of all posts |
media:cleanup-orphaned {--limit=500} | Deletes files uploaded more than 30 minutes ago and not attached to a post, comment or other record |
moderation:comments {--sync} | Runs AI moderation of the next batch of unreviewed comments. With --sync runs immediately, without the queue |
subscriptions:payments:check-pending {--minutes=10} {--queue=subscription-payments} | Queues status checks of pending payments updated in the last --minutes minutes |
subscriptions:auto-renew | Starts auto-renewal of subscriptions that expired in the previous hour |
notifications:reactions-digest | Sends emails with the reactions summary for the previous hour |
notifications:daily-digest | Sends the "Interesting of the day" email |
notifications:blog-stats | Sends blog statistics for 7 days |
Schedule
| Command | Frequency |
|---|---|
rating:update-place-history | every minute |
subscriptions:payments:check-pending | every minute |
moderation:comments | every minute |
media:cleanup-orphaned | every 30 minutes |
users:unban | hourly |
users:purge-deleted | hourly |
subscriptions:auto-renew | hourly |
achievements:award | hourly |
notifications:reactions-digest | hourly at :05 |
topics:update-activity-score | twice a day |
achievements:award --full | daily at 03:30 |
notifications:daily-digest | daily at 09:00 |
notifications:blog-stats | Mondays at 10:00 |
rating:save-monthly-places | on the 1st of each month at 00:10 |
The schedule is printed by:
bash
php artisan schedule:listLaravel commands
Database
bash
php artisan migrate --force # run migrations
php artisan migrate:status # migration statusCache
bash
php artisan optimize:clear # clear all cachesQueues
bash
php artisan horizon:status # Horizon status
php artisan horizon:terminate # restart workers, Supervisor brings them back up
php artisan queue:failed # failed jobs
php artisan queue:retry all # retry failed jobsSearch
bash
php artisan scout:import "App\Models\Post"
php artisan scout:import "App\Models\User"
php artisan scout:flush "App\Models\Post"The index can also be synchronized from the admin panel; see Search.
Other
bash
php artisan about # environment summary
php artisan tinker # interactive console
php artisan list # list all commands