Update scheduled machine from GitHub action

Currently, I have two scheduled machines:

fly m run -r “fra” --env “APP_ENV=production” --env “LOG_CHANNEL=stderr”
–env “LOG_LEVEL=info” --schedule hourly . “php artisan queue:work --stop-when-empty”

fly m run -r “fra” --env “APP_ENV=production” --env “LOG_CHANNEL=stderr”
–env “LOG_LEVEL=info” --schedule hourly . “php” “artisan” “schedule:run

And some CI/CD from GitHub:

name: Fly Deploy
on:
push:
branches:
- production
jobs:
deploy:
name: Deploy app
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

Can I update the scheduled background workers with the CI/CD?

What are you trying to update? We have a fly machine update command that might do what you need.

Alternatively, for Laravel, if you used fly launch to generate the Dockerfile you can create a cron process and queue worker process like so: Cron and Queues · Fly Docs

I’m trying to update the docker container it runs on. Because I presume the deployment only updates the container for the 24/7 machine. While the scheduled ones keep running on the old version? I prefer to use the schedulers because the machines are stopped between runs, in comparison with the processes.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.