Skip to content

CRON quick start

The CRON module in the BeAdmin panel lets you run scripts on a schedule: scripts live in a shared store, you attach a schedule to them via visual fields, and you watch run results on the same page.

The CRON module is available right after the panel is installed — open it in the side menu and proceed to creating the first script.

Create a script

A script is an executable file that the scheduler runs. In the module, scripts live in a shared store and can be reused across jobs: the same script can be run on different schedules.

A job needs a script. You can create the script in advance on the "Scripts" tab or directly from the job creation dialog.

  1. On the module page, switch to the "Scripts" tab and click "Create script".
  2. In the "Create script" dialog, fill in the fields:
    • "Filename" — Latin letters, digits, spaces, dots, hyphens, and underscores are allowed. If you forget the .sh extension, the panel adds it for you. The panel will warn you if the name is too long or too short, or if a script with the same name already exists.
    • "Script content" — the first line must be a shebang (for example, #!/bin/bash or #!/usr/bin/env python3). Without it the panel will not save the file and will show an error.
  3. Click "Create".

A minimal example — the script writes a line with the date to a file, an easy way to confirm the job runs:

bash
#!/bin/bash
# my_script1.sh
echo "Cron test run at $(date)" >> /home/www/cron_test.log

We recommend choosing a path inside /home/www/... — the user has write access there, and the result is immediately visible in the file manager. If you write to another directory, the script may run, but you will only be able to inspect its output through the server console.

Create a job

A job ties a script to a schedule. The panel assembles the schedule string from the values you pick in the fields — knowing cron syntax is not required.

  1. Switch to the "Jobs" tab and click "Create job".
  2. In the "Create CRON job" dialog, fill in the fields:
    • "Name" — an arbitrary job name shown in the panel, used to tell jobs apart in the list.
    • "Script" — pick an existing script. If the script you need does not exist yet, create it via the button next to the selector — once created, it is selected automatically.
    • Schedule — five fields: minute, hour, day of month, month, and day of week. Hints help you assemble a schedule without knowing cron syntax — ranges, lists, and steps are set in one click. Below the fields a "next time triggered" and "then" preview shows when the job will run.
    • "Launch with sudo privileges" — needed for operations on system files and services. Available only to the panel administrator.
    • "Execute on the last day of the month" — a separate mode: runs only on the last day of the month, e.g. January 31 or April 30. The panel will substitute the right combination into the schedule fields, do not edit them by hand.
  3. The "Enable" toggle in the dialog footer turns the job on right after creation. If the toggle is off, the job is created but does not run until enabled in the list.
  4. Click "Create job".

💡 Schedule preview

If the "next time triggered" preview shows a date you did not expect, double-check the schedule fields — most often a star is left in place of a concrete value, or vice versa.

Manage jobs

A created job appears in the list on the "Jobs" tab. From the list you can temporarily disable a job without deleting it, run it manually to test the script (without waiting for the schedule), and check the status of the last run — done, failed, or "Not executed".

The script output goes to the file specified inside the script itself (for example, >> /home/www/cron_test.log from the example above). You can open the log via the BeAdmin file manager.

BeAdmin © 2025. All rights reserved.