The Cronjob tab lets you schedule automated tasks to run at regular intervals on your application's server — database maintenance, report generation, queue flushing, file cleanup, or any PHP, Python, or shell script. Cron jobs are registered in the server's crontab and managed entirely from the dashboard. The list auto-refreshes every 10 seconds so execution status and next-run times stay current without a manual reload.
1. Page layout
The page has two parts: a header bar with search and action buttons, and the cron job table. Modals and drawers open on top of the table for adding, editing, monitoring, configuring alerts, and deleting jobs.
2. Header bar
| Control | What it does |
|---|---|
| Search by JOB name | Filters the table in real time, case-insensitive, matching against the job name field only. |
| Bulk Actions | Opens the Bulk Actions modal to delete all selected jobs at once. Only visible when your role has the Bulk_Application_Cronjob_Actions permission. |
| ADD CRONJOB | Opens the Add Cronjob modal. Only visible when your role has the Add_Application_Cronjob permission. |
3. Cron job table

Each row represents one scheduled job. Rows can be selected individually or all at once with the checkbox column for bulk deletion.
| Column | What it shows |
|---|---|
| Checkbox | Select or deselect this job for bulk actions. The header checkbox selects or deselects all visible rows. |
| Job Name & Type | The job's display name (bold) and the full command beneath it in monospace, truncated with a tooltip for long commands. |
| Schedule | Human-readable schedule description (e.g. Hourly, Every 5 mins, Daily at 02:30 AM) with the raw cron expression in monospace beneath it when the two differ. |
| Status | Three possible states: Healthy (green dot — job is enabled and last run succeeded), Failed (red dot — job is enabled but last run failed), Disabled (grey dot — job has been paused). |
| Last 10 Runs | A row of up to 10 vertical pill bars, one per recorded execution, newest on the right. Colour per pill: Green = success, Red = failed, Amber = slow (ran but exceeded expected duration), White with border = missed/skipped. Hover a pill to see the timestamp and status. |
| Next Run | Shows the calculated time of the next scheduled execution — e.g. Today at 3:00 PM or Tomorrow at 12:00 AM. Shows Paused when the job is disabled. Shows a blue spinning badge while a Run Now execution is in progress. |
| Enabled | A toggle switch. Click to pause (blue = enabled, grey = disabled). Clicking always opens a confirmation modal before the change is applied. |
| Action | A three-dot menu button that opens a dropdown with all available actions for this job. |
Run history legend
A legend row at the bottom of the table explains the four pill colours — Success (green), Failed (red), Slow (amber), and Missed (white with border). Use this as a quick reference when reviewing execution history.
4. Row action menu
Click the three-dot menu at the right of any row to open the action dropdown.
| Action | Behaviour |
|---|---|
| Monitor | Opens the Monitor drawer — a full-featured right-side panel with execution history, a duration chart, run statistics, and a run log viewer for this job. |
| Run Now | Executes the cron job immediately, outside its normal schedule. The Next Run cell shows a blue spinning badge while the execution is in progress. The table refreshes automatically when it completes. |
| Pause Job / Resume Job | Opens the toggle confirmation modal. Pausing stops automatic execution; resuming restarts it according to the schedule. The label switches between Pause Job (when enabled) and Resume Job (when disabled). |
| Edit Job | Opens the Edit Cronjob modal pre-filled with the current settings. |
| Alert Settings | Opens the Alert Settings drawer to configure when and how you are notified about this job's failures, missed runs, and slow runs. |
| Delete Job | Opens the Delete Cronjob confirmation modal. Permanently removes the job from the crontab and the dashboard. |
Enable / Disable confirmation modal
Clicking the Enabled toggle switch or the Pause/Resume Job menu item always shows a confirmation modal before applying the change. The modal explains what will happen — pausing stops automatic execution; resuming restarts it. Click the confirmation button to proceed or Cancel to dismiss without making any change.
5. Adding a cron job

Click ADD CRONJOB to open the modal. The modal has two input modes — Visual Schedule Builder (default) and Raw Cron String — selectable via tabs at the top.
Visual Schedule Builder tab
A blue Schedule Summary card at the top of the form shows a live human-readable description of the schedule you are building — for example "Runs every day at 12:00 AM (Midnight)" — along with the calculated next run time and the raw cron expression. The card updates in real time as you change any field. All schedules run in Indian Standard Time (IST).
| Field / Control | Details |
|---|---|
| Job Name | Required. A human-readable label for the job, e.g. Hourly Database Cleanup or Laravel Scheduler. |
| Quick Schedule Presets | Six one-click presets: Every 5 Mins (*/5 * * * *), Every 15 Mins, Hourly, Daily (Midnight), Weekly (Sun), Monthly (1st). The selected preset is highlighted. Clicking a preset updates all five expression fields. |
| Custom Expression Parts | Five individual text inputs — Minute, Hour, Day, Month, Weekday — for building any schedule. Accepts standard cron syntax: *, */n, n, n-m, and comma-separated lists. Validation errors appear inline beneath each field. |
| Job Type | Dropdown with three options: PHP (CLI Script), Python Script, Shell / Bash Command. The selection changes the command field placeholder to show relevant examples. |
| Working Directory | Optional sub-path relative to the application's root folder (shown as a prefix). Leave blank to use the application root. Example: entering /backend makes the working directory <approot>/backend. |
| Command | Required. The script or command to execute. Examples by type: PHP — php artisan schedule:run; Python — python3 script.py; Shell — bash backup.sh or a curl call. Paths are relative to the Working Directory. |
| Assign Cron Allow | Which system user runs the cron: Root User or Application Master User. |
| History Retention (Days) | How many days of execution history to keep. The maximum allowed depends on the schedule frequency — frequent jobs (every minute or every few minutes) are capped at 1 day to control storage; daily jobs allow up to 365 days. The maximum is shown next to the field. |
Raw Cron String (Advanced) tab
Switch to the Advanced tab when you already have a full cron string and want to paste it in directly. Enter the complete expression in the format:
Example: */15 * * * * php artisan schedule:run. The entire string — schedule and command — goes in the single textarea. The Job Name, Assign Cron Allow, and History Retention fields are still required and shown below the textarea.
6. Editing a cron job

Click Edit Job from the action menu to open the Edit Cronjob modal. It is pre-filled with the current job settings and works identically to the Add form — both the Visual Builder and Raw Cron String tabs are available. The Raw Cron String textarea is pre-populated with the existing schedule parts and command. Save updates the job in place without removing its execution history.
7. Deleting a cron job
Click Delete Job from the action menu to open the Delete Cronjob confirmation modal. Confirming permanently removes the job from the crontab and the dashboard, including all its execution history. This cannot be undone.
8. Bulk delete
Select one or more jobs using the checkboxes in the table, then click Bulk Actions in the header. The Bulk Actions modal shows a warning that all selected jobs will be permanently deleted and cannot be recovered. Click APPLY to confirm the deletion or close the modal to cancel. Bulk Actions only supports deletion — for other changes (schedule, command, status) edit jobs individually.
9. Monitor drawer

The Monitor drawer slides in from the right when you click Monitor in a job's action menu. It provides a full view of the job's health and execution history without leaving the page.
Summary stats cards
Four stat cards across the top of the drawer show at a glance:
- Success rate — percentage of runs that completed successfully
- Total runs — total number of executions recorded
- Average duration — mean execution time across all recorded runs
- Last run time — when the job last executed
Duration chart
A line chart plots execution duration (in milliseconds or seconds) for every recorded run. A dashed average line is drawn across the chart. Each point is coloured blue for success or red for failure. Hover over a point to see the exact duration, status, and time of that run. A selector lets you change the time window: Last 1 Hour, Last 24 Hours, Last 7 Days, or Last 30 Days. Min, average, and max durations are shown below the chart.
Run timeline
Below the chart, the last 20 runs are shown as a horizontal timeline of colour-coded bars — the same green/red/amber/white system as the table's Last 10 Runs column but showing up to 20 entries.
Run history table
A paginated table lists every recorded execution with columns for the run time, status badge, duration, and exit code. Filter buttons at the top let you narrow to All, Success, Failed, or Slow runs. A Refresh button re-fetches the history without closing the drawer.
Drawer quick actions
The drawer header contains shortcut buttons so you can act on the job without closing the monitor view — Run Now, Pause/Resume, Edit, Alert Settings, and Delete are all accessible directly from inside the drawer.
10. Alert Settings drawer

Click Alert Settings from the action menu (or from inside the Monitor drawer) to open the Alert Settings panel for this job. Alerts are sent in-app and optionally by email.
| Setting | Options / Details |
|---|---|
| When it fails | Alert after 1, 2 (recommended), 3, or 5 consecutive failed runs. Using a threshold above 1 avoids false alarms from transient failures. |
| When it doesn't run | Toggle — alerts if a run has not started within a configurable grace period after the scheduled time. Grace period options: 1, 5, 10, 30 minutes, or 1 hour. Useful for catching jobs that silently stop firing. |
| When it runs too long | Toggle — alerts when a run takes longer than 2x its average duration or a custom slow threshold you set. Useful for detecting performance regressions. |
| When it recovers | Toggle — sends a recovery notification when a previously failing or missed job runs successfully again. |
| Send email | Toggle — enables email delivery of all alerts for this job in addition to in-app notifications. |
Click Save settings inside the drawer to apply the configuration. Changes take effect immediately for future runs.
11. Cron expression reference
A cron expression has five fields separated by spaces: Minute Hour Day Month Weekday. Each field accepts:
| Syntax | Meaning | Example |
|---|---|---|
* | Every valid value | * * * * * — every minute |
n | Exactly this value | 0 9 * * * — 9:00 AM daily |
*/n | Every n-th value | */15 * * * * — every 15 minutes |
n-m | Range from n to m | 0 9-17 * * * — once an hour from 9 AM to 5 PM |
n,m | This value or that value | 0 0,12 * * * — midnight and noon daily |
| Field | Valid range | Notes |
|---|---|---|
| Minute | 0 – 59 | |
| Hour | 0 – 23 | All times in Indian Standard Time (IST) |
| Day | 1 – 31 | |
| Month | 1 – 12 | |
| Weekday | 0 – 6 | 0 and 7 both mean Sunday |
| Preset | Expression | Description |
|---|---|---|
| Every 5 Mins | */5 * * * * | Runs every 5 minutes |
| Every 15 Mins | */15 * * * * | Runs every 15 minutes |
| Hourly | 0 * * * * | Runs at minute 0 of every hour |
| Daily (Midnight) | 0 0 * * * | Runs once per day at 12:00 AM IST |
| Weekly (Sun) | 0 0 * * 0 | Runs every Sunday at 12:00 AM IST |
| Monthly (1st) | 0 0 1 * * | Runs on the 1st of every month at 12:00 AM IST |
12. Practical tips
- Use Run Now to test a job immediately. After adding a new job, use Run Now from the action menu to verify it executes correctly before waiting for the scheduled time. Check the Monitor drawer to see whether the run succeeded or failed.
- Watch the Last 10 Runs column. A string of red bars means the job is consistently failing. Open the Monitor drawer and check the run history table for exit codes and error output.
- Use a grace period alert for critical jobs. If a scheduled task silently stops running (e.g. the server's cron daemon restarts), no error log is generated because nothing ran. The missed-run alert with a grace period is the only way to catch this.
- Set History Retention based on how long you need to debug. For daily or weekly jobs, 30–365 days of history gives you a clear picture of long-term reliability. For jobs that run every minute, keep it at 1 day to avoid storage buildup.
- Use the Working Directory field for relative paths in commands. If your command uses relative file paths (e.g. php cron.php), set the Working Directory to the folder containing the file so the command resolves correctly.
- All schedules run in IST. When entering hours in the cron expression, remember the server uses Indian Standard Time (UTC+5:30). A job set to run at hour 0 fires at midnight IST.
- The Enabled toggle is non-destructive. Pausing a job retains its schedule and history. Resume it at any time and it picks up from its next scheduled run without any reconfiguration.
- For Laravel applications, use the built-in scheduler. Rather than adding many individual cron jobs, add one job running
php artisan schedule:runevery minute. Define all tasks in your Laravel schedule and let the framework manage them — the dashboard shows this single job's health.
13. Common problems
| Problem | Likely cause and fix | |
|---|---|---|
| Job shows Healthy but nothing actually happened | The command ran but produced no observable effect — check the command is correct by running it via Run Now and reviewing output in the Monitor drawer | |
| Job shows Failed immediately after creation | The command path is wrong or the script has an error — check the command in Edit Job and use Run Now to test it; view the run output in the Monitor drawer | |
| Amber (Slow) pills in run history | The job is taking significantly longer than usual — check for database locks, external service timeouts, or increased data volume; consider splitting the task | |
| White (Missed) pills appearing regularly | The cron daemon may have been temporarily unavailable, or the job's schedule is too frequent for the server to handle — check server load and consider a less frequent schedule | |
| Next Run | shows Paused unexpectedly | The job was disabled — click the Enabled toggle and confirm the resume modal to re-enable it |
| ADD CRONJOB button is not visible | Your user account does not have the Add_Application_Cronjob permission for this server | |
| Bulk Actions | button is not visible | Your account does not have the Bulk_Application_Cronjob_Actions permission |
| Validation error on Minute / Hour field | The expression syntax is invalid — use standard cron notation: *, n, */n, n-m, or comma-separated values; no spaces within a field | |
| Raw Cron String fails to save | The string must have exactly 5 schedule parts and at least one command word separated by spaces — e.g. */15 * * * * php artisan schedule:run |
14. Relationship to other tabs
| Where | Scope |
|---|---|
| Cronjob (this tab) | Scheduled tasks specific to this application — create, monitor, edit, and delete |
| Processes tab | Long-running background processes (PM2 / systemd) — use for tasks that run continuously rather than on a schedule |
| Logs tab | Web server logs — use if a cron job triggers an HTTP request and you need to trace it in the access log |
| Server Cronjobs | Server-level cron jobs not tied to a specific application — system-wide maintenance tasks |
| Settings tab | Uptime monitoring — if a cron job is responsible for refreshing content that an uptime check verifies, a job failure can trigger a Settings alert |
Scheduled tasks keep your application healthy in the background. Use the Visual Schedule Builder for quick setup, the Monitor drawer to investigate failures, Alert Settings to get notified without constantly watching the dashboard, and Run Now to test any change immediately.
Frequently asked questions
How do I test a cron job without waiting for its schedule?
Use Run Now from the job's action menu, then open the Monitor drawer to see whether the run succeeded and review its output.
When should I use a cron job instead of a background process?
Use a cron job for tasks that run on a schedule, such as cleanups or reports. Use the Processes tab for tasks that must run continuously, such as queue workers.
Can SharkCluster alert me when a cron job stops running?
Yes. In Alert Settings, turn on When it doesn't run to be alerted if a run has not started within a grace period of 1, 5, 10 or 30 minutes or 1 hour. You can also alert after 1, 2, 3 or 5 consecutive failures.
How do I schedule a cron job for my application?
Open the application's Cronjob tab and click ADD CRONJOB. Build the schedule with the Visual Schedule Builder or paste a full line in the Raw Cron String tab, for example */15 * * * * php artisan schedule:run.
Related guides
- Health alertsHealth alertsSetting metric thresholds, routing alerts to the right people, and choosing levels that stay useful instead of training everyone to ignore them.
- ApplicationsCreating an applicationDeploy an application onto an existing server with its database created and wired in, and what each choice on the create form commits you to.
- ApplicationsAccessSFTP and SSH credentials for a single application, how they are scoped to its directory, and how to rotate them.
- ApplicationsAnalyticsTraffic, PHP performance, database activity and disk usage for one application, in one place.
Something here not matching what you see in the panel?