Skip to main content

saucectl authoring schedules

Run test suites created with Sauce AI for Test Authoring on a recurring schedule.

Aliases: schedule, test-schedules

Usage​

$ saucectl authoring schedules [command] [flags]

Commands​

CommandDescription
listList test schedules.
getShow a test schedule.
createCreate a test schedule.
updateUpdate a test schedule.
enableResume a suspended schedule.
disableSuspend a schedule without deleting it.
deleteDelete a test schedule.

All commands also accept the global options, such as --region.

list​

List test schedules.

Alias: ls

$ saucectl authoring schedules list [flags]
FlagShorthandDescription
--out-oOutput format. Options: text (default) and json.
--idNoneOnly these schedule IDs. Repeatable.
--test-suite-idNoneOnly schedules that run this suite. Repeatable.
--searchNoneCase-insensitive substring match on the schedule name.
--start-dateNoneOnly schedules created on or after this ISO 8601 date.
--end-dateNoneOnly schedules created on or before this ISO 8601 date.
--user-idNoneFilter by the ID of the user who created the schedule.
--team-idNoneFilter by team ID.
--skipNoneNumber of results to skip. Default is 0.
--limitNoneMaximum number of results to return. Default is 20. Use 0 to return only the total count.
--allNoneReturn every result, fetching all pages. --limit is ignored.
saucectl authoring schedules list
saucectl authoring schedules list --test-suite-id <test-suite-id>

get​

Show a test schedule.

$ saucectl authoring schedules get <id> [flags]
FlagShorthandDescription
--out-oOutput format. Options: text (default) and json.
saucectl authoring schedules get <schedule-id>

create​

Create a test schedule that runs one or more test suites.

--name, --cron, --timezone, and at least one --test-suite-id are required.

$ saucectl authoring schedules create [flags]
FlagShorthandDescription
--nameNoneRequired. Name of the schedule, 1 to 255 characters.
--cronNoneRequired. Six-field cron expression that starts with seconds. For example, "0 0 6 * * 1-5" runs at 06:00 on weekdays.
--timezoneNoneRequired. IANA region/city time zone for the cron expression, for example Europe/Berlin or America/New_York. UTC is not accepted. For a zero offset, use a zone such as Atlantic/Reykjavik.
--test-suite-idNoneRequired. Suite to run. Repeatable.
--running-user-idNoneUser that the scheduled runs execute as. Default is you.
--stateNoneENABLED or DISABLED (case-insensitive). Default is ENABLED.
--start-dateNoneISO 8601 date before which the schedule doesn't run.
--end-dateNoneISO 8601 date after which the schedule stops.
--max-runsNoneMaximum number of runs before the schedule disables itself.
--tunnel-nameNoneSauce Connect tunnel to route scheduled runs through.
--buildNoneBuild name for scheduled runs.
--out-oOutput format. Options: text (default) and json.
saucectl authoring schedules create --name "Nightly" --cron "0 0 2 * * *" --timezone Europe/Berlin \
--test-suite-id <test-suite-id> --build nightly

saucectl authoring schedules create --name "Smoke" --cron "0 */30 * * * *" --timezone America/New_York \
--test-suite-id <test-suite-id> --max-runs 10 --state disabled

update​

Update a test schedule. Only the settings you specify change. saucectl reads the schedule first and sends back its current settings, suites, and state, so an update never erases settings you don't mention.

To change the schedule's suites, either replace the whole list with --test-suite-id, or add and remove individual suites with --add-test-suite-id and --remove-test-suite-id. A schedule must keep at least one suite.

$ saucectl authoring schedules update <id> [flags]

update accepts the same settings flags as create: --name, --cron, --timezone, --running-user-id, --state, --start-date, --end-date, --max-runs, --tunnel-name, and --build. It also accepts the following flags.

FlagShorthandDescription
--test-suite-idNoneReplace the schedule's suites with these. Repeatable.
--add-test-suite-idNoneAdd this suite to the schedule. Repeatable.
--remove-test-suite-idNoneRemove this suite from the schedule. Repeatable.
--unsetNoneClear an optional setting. Options: tunnelName, buildName, startDate, endDate, and maxRuns. Repeatable. You can't set and clear the same setting in one command.
--out-oOutput format. Options: text (default) and json.
saucectl authoring schedules update <schedule-id> --cron "0 0 3 * * *"
saucectl authoring schedules update <schedule-id> --add-test-suite-id <test-suite-id> --unset maxRuns
saucectl authoring schedules update <schedule-id> --unset tunnelName

enable and disable​

enable resumes a suspended schedule. disable suspends a schedule without deleting it. No runs start while a schedule is disabled.

$ saucectl authoring schedules enable <id> [flags]
$ saucectl authoring schedules disable <id> [flags]
FlagShorthandDescription
--out-oOutput format. Options: text (default) and json.
saucectl authoring schedules disable <schedule-id>
saucectl authoring schedules enable <schedule-id>

delete​

Delete a test schedule.

Alias: rm

$ saucectl authoring schedules delete <id> [flags]
FlagShorthandDescription
--yes-ySkip the confirmation prompt. Required when saucectl is not running interactively.
saucectl authoring schedules delete <schedule-id> --yes