php artisan migrate, php artisan cache:clear, a
one-off script.
Where it runs
In the live release, in the application directory, as the site’s own account — exactly like a deploy script. A command cannot reach the machine beyond the site it was run against. The sameSHIPWAYS_* variables are in the environment, so $SHIPWAYS_PHP gets
this site’s PHP version rather than the machine’s CLI default.
It is bounded
A command is stopped after 120 seconds by default. That is short on purpose: this is somebody waiting on a page, and a command that never returns would hold the server’s queue lane for as long as the agent allows. Anything longer belongs in a deploy script or a scheduled job. Self-hosted installations can change the limit withSHIPWAYS_COMMAND_TIMEOUT.