Verify a scheduled CLI job
Run a Dosya CLI job with explicit paths, secret, and workspace, preserve JSON and exit evidence, then verify its remote result before success.
Last reviewed
Schedulers provide a sparse environment and may run from an unexpected directory. A reliable Dosya job uses absolute paths, explicit credential isolation, structured output, and a separate verification read.

Before you start
- Use the absolute CLI binary and local input path. The default request timeout is 30 seconds; set a positive
--timeoutonly when the operation needs a different bound. - Inject
DOSYA_API_KEYfrom the scheduler or assign a privateXDG_CONFIG_HOME; there is no--profileoption. - Pin and verify the intended workspace before changing data.
Steps
- At job start, record the UTC time, CLI version, absolute executable, nonsecret job name, and expected workspace. Do not log the secret or full environment.
- Run
whoami --jsonwith the scheduled credential and reject an unexpected account. Confirm the target workspace through an explicit read. - Invoke the business command with absolute paths,
--json, and the approved timeout. Redirect stdout and stderr to separate protected files. - Save the original process status. Classify 3 as auth, 4 as network, 5 as forbidden, 75 as maintenance, and 130 or 143 as cancellation; retry only operations safe to repeat.
- Parse the command-specific receipt and extract its resource ID. Check partial batch failures rather than trusting a generic success assumption.
- Perform a read-only remote verification for the expected ID, parent, name, size, or deleted state. Mark the schedule successful only after that postcondition matches.

Expected result
The scheduler records identity, command receipt, exit status, and a read-only remote postcondition. A local zero exit without the expected remote state cannot become a successful run.
Troubleshooting
It works interactively but not on schedule. Compare executable path, working directory, XDG root, secret injection, and network access.
The job times out. Increase a positive --timeout only after confirming the operation and scheduler deadline permit it.
A mutation has network exit 4. Read remote state before retrying. A transport failure does not prove the server rejected the write.
Related guides
Was this helpful?
Loading helpfulness results…
Voting saves a necessary ballot cookie for up to 180 days so you can change your answer.
Questions and replies
Ask about the steps in this guide. Questions are reviewed before publication.
Keep account details, credentials and private files out of public questions. Use private support for those.
Loading questions…
Sign in to your Dosya account to ask a question.