Skip to content
 
 

Latest commit

 

History

238 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crontab UI

What's new in this fork

macOS users — lightweight desktop launcher:

  • Install Node.js 20 or newer if it is not already installed.
  • Build the app with npm run mac:app.
  • Drag dist/Crontab UI.app to /Applications.
  • Clear the unsigned-build quarantine flag once: xattr -dr com.apple.quarantine "/Applications/Crontab UI.app".
  • Launch from Spotlight or Applications. The app opens Terminal, starts the Express server on http://127.0.0.1:47832/, and opens your default browser. Reopening the app restarts the existing desktop server instead of creating another one. Set CRONTAB_UI_DESKTOP_PORT before launch to use a different fixed port.
  • Press Ctrl+C in Terminal or close the Terminal window to stop the server.
  • Cron data lives at ~/Library/Application Support/crontab-ui/crontabs/.

Crontab UI in dark mode

Job edit modal in dark mode

Visual refresh

  • Centered max-width layout (1280px) with rounded card sections and a tighter, monospace-command table.
  • Light / dark / system theme toggle in the navbar, with disabled-job rows, the Test Run console, and the Crontab Preview pane all themed correctly in dark mode.
  • Outlined, color-coded row actions (Run = green, Edit = blue, stderr-log = red, stdout-log = cyan, Duplicate = gray, Delete = red) with hover tooltips. Distinct toggle icons (green pill = running, gray pill = stopped) replace the previous duplicated play icons.
  • Flatter toolbar — New Job · Refresh · Preview on the left, Import · Export on the right; Backup lives in the navbar with a small archive icon and a download CTA.

Editing experience

  • Compact edit modal that fits on one screen without scrolling.
  • Quick Schedule presets (Minutely, Hourly, Daily, Monthly, Weekly, Yearly, Startup) populate the Minute/Hour/Day/Month/Week inputs on click so you can fine-tune from there.
  • Live human-readable schedule preview next to the Set button — the cron expression rendered in plain English by cronstrue (bundled client-side, ~22 KB). Updates as you type in any cron field, on every Quick Schedule click, and on open. Stays blank for the all-* default and half-typed expressions.
  • Inline Test Run — a Test Run button in the Job modal executes the command (with the configured environment variables prepended) and shows exit code, stdout, and stderr inline. No need to wait for the next cron tick to verify your command works.
  • Per-job environment variables — an Environment Variables (Optional) field in the Job modal accepts one KEY=value per line (e.g. PATH=/usr/local/bin:/usr/bin, MAILTO=ops@example.com). Prepended to the command at both deploy time and Test Run, so you don't have to bake them into a wrapper script.
  • Uploaded or pasted code jobs — switch the Job modal from Command to Code, then upload or paste a .sh, .bash, .py, .js, .mjs, or .cjs script. Crontab UI saves it as a managed file and runs it with bash, python3, or node. Managed code files are materialized under CRONTAB_UI_CODE_PATH when set, otherwise under CRON_DB_PATH/code_uploads. If CRON_DB_PATH points inside the system temp directory, Crontab UI falls back to the OS user-data directory instead of writing runnable cron files under /tmp: Linux uses ${XDG_DATA_HOME:-~/.local/share}/crontab-ui/code_uploads, macOS uses ~/Library/Application Support/crontab-ui/code_uploads, and Windows uses %LOCALAPPDATA%\crontab-ui\code_uploads.

Backups & import

  • Named backups: clicking Backup opens a small modal pre-filled with a local timestamp; supply any name and it's saved as backup <name>.db. Re-using the same name overwrites the previous file by design. Backups dropdown is sorted by mtime (newest first) and labels strip the backup / .db boilerplate.
  • Import opens a modal with a visible file picker and explains that an automatic backup is created server-side before the new database overwrites the existing one.
  • Toggling enable/disable updates the row in place (icon, tooltip, row highlight) instead of doing a full location.reload(), so search filter, sort, scroll position, and pagination are preserved.
  • Auto-sync DB with system crontab on every page load so jobs added directly via crontab -e are picked up.

Other

  • express-rate-limit default raised from 300 req / 15 min to 1000 req / 10 min so static-asset-heavy refreshes don't trigger 429s.
  • macOS desktop launcher — see the install callout above; build it yourself with npm run mac:app.

For a per-release breakdown see the Releases page.


Original readme from alseambusher/crontab-ui

Editing the plain text crontab is error prone for managing jobs, e.g., adding jobs, deleting jobs, or pausing jobs. A small mistake can easily bring down all the jobs and might cost you a lot of time. With Crontab UI, it is very easy to manage crontab. Here are the key features of Crontab UI.

flow

  1. Easy setup. You can even import from existing crontab.
  2. Safe adding, deleting or pausing jobs. Easy to maintain hundreds of jobs.
  3. Backup your crontabs.
  4. Export crontab and deploy on other machines without much hassle.
  5. Error log support.
  6. Mailing and hooks support.

Read this to see more details.

Setup

Get latest node from here. Then,

npm install -g crontab-ui
crontab-ui

If you need to set/use an alternative host, port OR base url, you may do so by setting an environment variable before starting the process:

HOST=0.0.0.0 PORT=9000 BASE_URL=/alse crontab-ui

By default, db, backups and logs are stored in the installation directory. It is recommended that it be overriden using env variable CRON_DB_PATH. This is particularly helpful in case you update crontab-ui.

CRON_DB_PATH=/path/to/folder crontab-ui

Authentication

Three modes are supported, resolved in this order:

  1. Disabled — set CRONTAB_UI_DISABLE_AUTH=true. No auth is applied regardless of other vars. The macOS desktop launcher sets this automatically and always runs without a login wall.

  2. JWT login — set ENABLE_AUTH=true. The UI renders a login screen at /login; on success, a JWT is issued in an httpOnly, SameSite=strict cookie. Required env vars:

    • BASIC_AUTH_USER, BASIC_AUTH_PWD — login credentials (reused from basic-auth mode).
    • JWT_SECRET — token signing secret. Generate with openssl rand -hex 32.
    • JWT_EXPIRES_IN (optional) — token lifetime. Default 7d. Accepts any value supported by jsonwebtoken (e.g. 24h, 30m).

    Example:

    ENABLE_AUTH=true \
    BASIC_AUTH_USER=admin BASIC_AUTH_PWD=secret \
    JWT_SECRET=$(openssl rand -hex 32) \
    crontab-ui
    
  3. Basic HTTP auth (legacy) — set BASIC_AUTH_USER and BASIC_AUTH_PWD (without ENABLE_AUTH). The browser shows a native auth dialog:

    BASIC_AUTH_USER=user BASIC_AUTH_PWD=SecretPassword
    

If none of the above env vars are set, the server runs without auth (existing behavior).

Also, you may have to set permissions for your node_modules folder. Refer this.

If you need to use SSL, you can pass the private key and certificate through environment variables:

SSL_CERT=/path/to/ssl_certificate SSL_KEY=/path/to/ssl_private_key

Make sure node has the correct permissions to read the certificate and the key.

If you need to autosave your changes to crontab directly:

crontab-ui --autosave

List of environment variables supported

  • HOST
  • PORT
  • BASE_URL
  • CRON_DB_PATH
  • CRON_PATH
  • CRONTAB_UI_CODE_PATH
  • BASIC_AUTH_USER, BASIC_AUTH_PWD
  • ENABLE_AUTH, JWT_SECRET, JWT_EXPIRES_IN
  • CRONTAB_UI_DISABLE_AUTH
  • SSL_CERT, SSL_KEY
  • ENABLE_AUTOSAVE

Docker

You can use crontab-ui with docker. You can use the prebuilt images in the dockerhub

docker run -d -p 8000:8000 alseambusher/crontab-ui

You can also build it yourself if you want to customize, like this:

git clone https://github.com/alseambusher/crontab-ui.git
cd crontab-ui
docker build -t alseambusher/crontab-ui .
docker run -d -p 8000:8000 alseambusher/crontab-ui

If you want to use it with authentication, You can pass BASIC_AUTH_USER and BASIC_AUTH_PWD as env variables

docker run -e BASIC_AUTH_USER=user -e BASIC_AUTH_PWD=SecretPassword -d -p 8000:8000 alseambusher/crontab-ui 

You can also mount a folder to store the db and logs.

mkdir -p crontabs/logs
docker run --mount type=bind,source="$(pwd)"/crontabs/,target=/crontab-ui/crontabs/ -d -p 8000:8000 alseambusher/crontab-ui

If you are looking to modify the host's crontab, you would have to mount the crontab folder of your host to that of the container.

# On Ubuntu, it can look something like this and /etc/cron.d/root is used
docker run -d -p 8000:8000 -v /etc/cron.d:/etc/crontabs alseambusher/crontab-ui

Resources

Adding, deleting, pausing and resuming jobs.

Once setup Crontab UI provides you with a web interface using which you can manage all the jobs without much hassle.

basic

Import from existing crontab

Import from existing crontab file automatically. import

Backup and restore crontab

Keep backups of your crontab in case you mess up. backup

Export and import crontab on multiple instances of Crontab UI.

If you want to run the same jobs on multiple machines simply export from one instance and import the same on the other. No SSH, No copy paste!

export

A backup is created automatically before importing.

Separate error log support for every job

logs

Donate

Like the project? Buy me a coffee!

Contribute

Fork Crontab UI and contribute to it. Pull requests are encouraged.

License

MIT

About

Easy and safe way to manage your crontab file

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages