create
Create a new scheduled task
conhive-agent cronjobmanager create
Description
Section titled “Description”Creates and schedules a new task to be run by the agent’s internal scheduler. Requires defining the task details: a unique name, an optional description, a cron expression (e.g., ”*/10 * * * *” for every 10 minutes) specifying the schedule, and the actual command or task to be executed by the agent. Input is typically provided via a JSON payload using the ‘—json’ flag.
conhive-agent cronjobmanager create [flags]
Examples
Section titled “Examples”cj create --json '{"name":"hourly-cleanup","description":"Clean temp files","expression":"0 * * * *","task":"filemanager cleanup /tmp"}'
Options
Section titled “Options” -h, --help help for create --json string JSON input (required) (with default values): { "name": "", "color": "#F5A623", "expression": "*/10 * * * *", "labels": {}, "protected": false, "disabled": false, "icon": "solar:atom-broken", "task": "" }
Options inherited from parent commands
Section titled “Options inherited from parent commands” -f, --log-format string Specify the logging format (options: console, json) (default "text") -l, --log-level string Define the logging level (options: trace, debug, info, warn, error, fatal, panic) (default "info") -o, --log-to-file Enable logging to a file (default true) -p, --port int32 Port to run the server on (default 5050) -w, --workdir string Set the working directory for agent operations (default: $HOME/.conhive)
SEE ALSO
Section titled “SEE ALSO”conhive-agent cronjobmanager
- Manage scheduled tasks (cron jobs)