Turn On Exec Jobs¶
Exec jobs for one task, with every switch on the way to a worker turned on.
Requirements:
- A task wildcard over the apps, for example
apps.x86_64-linux.*, see Evaluation Wildcards - A worker with the
execcapability, see Set Up an Exec Worker
1. Check the Switches¶
Exec jobs need three switches. A repository alone can never start code on a worker.
| Switch | Default | Where |
|---|---|---|
| Instance | on | services.gradient.exec.enable |
| Task | off | Task Settings -> Run exec jobs, or exec_enabled in the state |
| Worker | off | services.gradient.worker.capabilities.exec and enable_exec on the worker registration |
Build requests check the project setting Allow Exec Jobs in Build-Requests in place of the task switch.
2. Turn On Task and Worker¶
3. Read Refusals¶
Exec apps fail with a message on the task page while the instance or task switch is off.
| Message | Cause |
|---|---|
exec jobs are disabled on this instance |
exec.enable is off |
exec jobs are disabled for this task |
The task switch is off |
Exec jobs don't run in build requests for this project. Enable "Allow Exec Jobs in Build-Requests" in project settings. |
A build request without the project setting, see Run a Program from the CLI |
A finished job can start again with runExecJob from the API reference once every switch is on. An app refused during evaluation has no job and needs a new evaluation.
Verify Deployment¶
- Start an evaluation of the task. Exec jobs appear with a status in the Exec Jobs section of the evaluation.
- Waiting jobs name the missing requirement, for example a device without a connected worker.
Next Steps¶
- Set Up an Exec Worker: guest image, devices and limits
- Declare an Exec App:
passthru.gradientand hardware requests - Declarative State: the task
exec_enabledflag andenable_exec - Configuration: the
exec.enablesetting