Skip to main content

run_task_ctx_resource

Function run_task_ctx_resource 

Source
pub fn run_task_ctx_resource(
    command: &ResourceCommand,
    env: &BTreeMap<String, String>,
    version: &str,
    out: &mut impl Write,
) -> Result<(), String>
Expand description

schedr task-ctx resource set|get: reports the value of the resource a CommandResource setup creates (checked against its type at once), or prints the value a resource’s cleanup_command cleans up (as --params takes it: dates as text, tuples as lists).

§Errors

Outside a task, when the channel is gone, when a field or --json can’t be read, or when the agent refuses: set outside a setup, twice, or with a value of another type; get outside a cleanup; a missing --field.