Separate specs for cron and app server, but deploy not working

Hi,

I want to separate the specs for my cron jobs and my app server. I tried configuring this in fly.toml, but the deployment doesn’t seem to work properly.

When I check the Deployments section in the dashboard, it looks like it stops after “Setup and pull from git repository” and doesn’t continue.

Could this be due to a misconfiguration on my side, or is there something else I should check?

For reference, I’ve attached my full fly.toml below.

Thanks in advance!

============ fly.toml =============

app = ‘my-created-app’
primary_region = ‘nrt’

[env]
RAILS_ENV = ‘production’
RAILS_SERVE_STATIC_FILES = ‘true’
RAILS_LOG_TO_STDOUT = ‘true’

[processes]
app = “”
cron = “supercronic /app/crontab”

[http_service]
internal_port = 3000
force_https = true
auto_stop_machines = true
auto_start_machines = true
min_machines_running = 0
processes = [‘app’]

[[http_service.checks]]
method = ‘get’
path = ‘/api/v1/health_check’
protocol = ‘http’
timeout = ‘5s’
interval = ‘15s’
grace_period = ‘10s’

[[statics]]
guest_path = ‘/app/public’
url_prefix = ‘/public’

[vm]
size = ‘shared-cpu-2x’
memory = ‘1gb’

[[vm]]
processes = [‘cron’]
size = ‘shared-cpu-1x’
memory = ‘256mb’

[deploy]
release_command = ‘bundle exec rails db:migrate’

Hi there,

Your fly.toml looks odd.

As posted, your fly.toml has funny quotes e.g. ‘’ and “”. Can you please ensure it uses regular boring quotes everywhere?

Also - the vm section is incorrect. You have:


[vm]
size = ‘shared-cpu-2x’
memory = ‘1gb’

[[vm]]
processes = [‘cron’]
size = ‘shared-cpu-1x’
memory = ‘256mb’

This should be:

[[vm]]
size = "shared-cpu-2x"
memory = "1gb"
processes = ["app"]

[[vm]]
processes = ["cron"]
size = "shared-cpu-1x"
memory = "256mb"

Try these changes and see if you get further along!

When posting here, consider using code fences for code, config, logs, etc, like so:

```
Files in triple backticks
Will make it easier to see
Oblique quote marks
And indentation
```