Run Custom Commands on a Schedule
Custom command jobs let you run arbitrary shell commands in an agent container on a recurring schedule. This is useful for maintenance scripts, data pipelines, or any task that can be expressed as a shell command.
Prerequisites
- You are signed in to the XpressAI Platform.
- You have a deployed agent whose container will execute the command.
Steps
- Navigate to the Schedules section from the sidebar.
- Click Create Schedule.
- Enter a name for the schedule.
- Select Custom Command as the job type.
- Enter the shell command you want to run in the Command field.
- Set the cron expression and timezone.
- Click Save.
Command execution environment
- Commands run inside the agent container.
- The working directory is
/data/home/, which is the agent's mounted NFS volume. - Standard shell expansion is available (environment variables, globbing, pipes).
tip
You can chain multiple commands using && or ; in a single command field. For example: cd /data/home/scripts && python run_report.py
warning
Commands run with the permissions of the agent container. Make sure your command does not require privileges beyond what the container provides.
Verify
- The schedule appears in the Schedules list with the job type shown as Custom Command.
- After the scheduled time, check the execution history to confirm the command ran.
- Review the execution logs and exit code to verify the command completed successfully.