# urbestack-cron-job-set

First published 3 Oct 2026 (release 0.1.0) · Unchanged since publication

UrbeStack release 0.2.35 command, run as root in the server shell.

## Usage

```
urbestack-cron-job-set --user NAME --id ID [--schedule 'MIN HOUR DAY MONTH WEEKDAY'] [--command-stdin]
```

## Description

Updates a job in a customer's crontab. Pass the job ID shown by urbestack-cron-list to --id and give --schedule, --command-stdin, or both. The job keeps any value you omit.

Pass a cron keyword such as @daily to --schedule, or give five fields in order: minute, hour, day of the month, month, and day of the week. The fields support *, numbers, ranges, lists, and steps. A month or weekday can also be specified by its three-letter name on its own.

With --command-stdin, supply the new command as one line on standard input. Cron runs it as the customer with /bin/sh. Cron treats % as a line break. Write \% for a literal percent sign.

If the job line was edited at the shell or in the web interface, it has a new ID and UrbeStack refuses the old one. UrbeStack also refuses the update if the job was removed or the crontab is set aside. If the crontab has no MAILTO line, UrbeStack adds MAILTO="" at the top to suppress email from cron.

## Same in the API

- [PATCH /users/{name}/cron/jobs/{id}](https://urbestack.com/docs/api/patch-users-name-cron-jobs-id.md): Update a cron job's schedule, command, or both

## Command family: cron

- [urbestack-cron-job-add](https://urbestack.com/docs/commands/urbestack-cron-job-add.md): Adds a job to a customer's crontab.
- [urbestack-cron-job-del](https://urbestack.com/docs/commands/urbestack-cron-job-del.md): Removes a job from a customer's crontab immediately.
- [urbestack-cron-list](https://urbestack.com/docs/commands/urbestack-cron-list.md): Lists a customer's cron jobs from crontab -u NAME -l.
- [urbestack-cron-set](https://urbestack.com/docs/commands/urbestack-cron-set.md): Sets where cron sends a customer's job output.
