Long-running jobs
How jobs that run for hours are paid as they run, when they are stopped, and the GitHub limits that apply.
A-Line.cloud runners have no duration limit of their own. A job runs for as long as your balance pays for it, up to GitHub's limits. You can set a lower limit under Job duration limit in the Actions settings.
Paid as it runs
A running job is charged every few minutes for the whole minutes it has run, counted up to the runner's last heartbeat. A short hold (15 minutes of the job's price) is kept on your balance so the job always has time ahead of it. When the job ends, its bill is settled per started minute times the runner's vCPUs (vCPU-minutes) and any difference is charged or refunded.
The Overview tab shows each running job's cost so far, and the Usage tab shows what running jobs have cost so far next to the settled spend.
Your balance never goes below zero because of Actions.
When the balance runs low
When your running jobs are funded for under an hour, and again under 15 minutes, the Actions page shows a banner with a Top up link and you get an email. A top-up made before the money runs out keeps the jobs running.
If the balance runs out, the job is stopped and the History tab shows Stopped: balance ran out. Reaching the organization's monthly spend cap stops running jobs the same way. New jobs wait until there is balance again.
Platform faults
If a runner is lost to a fault on our side, such as the server disappearing or a fleet outage, the whole job is free. Anything already charged is refunded, and the History tab shows Refunded: platform fault. A runner that stops answering for reasons inside the job, such as a shutdown from the workflow, is billed up to its last heartbeat.
GitHub limits
timeout-minutesdefaults to 360. A job without the setting ends after 6 hours. Set a higher value in the workflow for longer jobs.- 5 days per job. GitHub ends any self-hosted job after 5 days of execution.
GITHUB_TOKENlasts 24 hours. Steps that need the token after hour 24 fail. Use a token of your own for later steps.
jobs:
train:
runs-on: a-line-8vcpu
timeout-minutes: 2880 # 48 hoursReminders
Jobs that run for a long time trigger reminder emails after 6, 12, 23, 48 and 96 hours, so a job that is running longer than you expected does not go unnoticed. The 23-hour reminder notes the GITHUB_TOKEN limit.