Deployments can get stuck if cron job is running
See Preventing stuck deployments caused by long-running cron jobs on community.platform.sh for background.
Judging from the traffic on the Platform.sh Slack, stuck deploys are a pain in the ass for many. While the script I wrote solves my problem and presumably solves it for others, it's not very elegant, makes for a lot of duplicated effort and is not easy to discover for other users.
A better solution could be to build this into the Platform.sh CLI, for example in the form of an environment:deploy command.
An even better solution could be to entirely reject deployments whenever a cron job is running.
For an example support ticket, see Stuck deployment.
Hi, we will be soon releasing the support for Crons Activities, as well as Cancellable Crons.
As a user, you will have way more visibility on running crons and their status (currently, only in the log file), and you will be able to cancel a running cron. Stay tuned.
#910