Scheduling a shell script with Cesium
How to Schedule a Shell Script with Cesium Automation
By KorOps Team
For many teams, automation starts with a simple shell script.
Scheduled Jobs
Maybe it's a nightly backup, a log cleanup task, a report generation script, or a maintenance operation that needs to run every day. The traditional approach is to add the script to crontab and hope it runs successfully. That works—until it doesn't.
The problem
As organizations grow, cron jobs become difficult to manage. Scripts end up scattered across multiple servers, ownership becomes unclear, and failures often go unnoticed until they cause a problem.
Configuring the cron job
Cesium Automation addresses these challenges by centralizing scheduling, execution, and monitoring.
Most automation tools want you to ship your secrets and your network to them. Cesium's agent runs inside your perimeter and only makes outbound HTTPS calls, which means:
- Your scripts, credentials, and target systems never leave your network.
- No inbound firewall holes.
- No SaaS getting paged at 3am because your database is down.
Step 1: Install a Task Executor
The first step is to install a Cesium Task Executor (TEX) on the server where the script will run.
The Task Executor establishes a secure outbound connection to Cesium Automation and allows jobs to be executed remotely without opening inbound firewall ports.
Once connected, the server becomes available as an execution target.
Step 2: Create a Shell Script Task
In the Cesium Automation dashboard, create a new task.
Configure the task with:
Task Type: Shell Script
Execution Target: Your Task Executor
Script Path: /opt/scripts/cleanup.sh
Save the task and test it by running it manually.
The execution output will be captured and stored by Cesium Automation.
Step 3: Configure a Schedule
Next, create a schedule for the task.
For example:
Daily at 2:00 AM Every Sunday at midnight Every 15 minutes First day of every month
Cesium Automation supports cron-style scheduling while providing a user-friendly interface for managing schedules.
Instead of editing crontab files on individual servers, schedules are managed centrally.
Step 4: Enable Notifications
One of the biggest advantages of Cesium Automation is visibility.
Configure notifications to alert your team when:
- A task fails
- A task completes successfully
Notifications can be sent through email, Slack, or other integrated systems.
Now your team knows immediately when a problem occurs.
Step 5: Review Execution History
Every execution is recorded.
For each run you can view:
- Start time
- End time
- Execution duration
- Standard output
This makes troubleshooting significantly easier compared to traditional cron jobs.
Instead of logging into servers and searching through log files, you can review execution history directly from the Cesium Automation dashboard.