- Modern UI: Beautiful, responsive interface with dark/light mode.
- System Information: Display hostname, IP address, uptime, memory, network and CPU info.
- Cron Job Management: View, create, and delete cron jobs with comments.
- Script management: View, create, and delete bash scripts on the go to use within your cron jobs.
- Job Execution Logging: Optional logging for cronjobs with automatic cleanup, capturing stdout, stderr, exit codes, and timestamps.
- Live Updates (SSE): Real-time job status updates and live log streaming for long-running jobs (when logging is enabled).
- Smart Job Execution: Jobs with logging run in background with live updates, jobs without logging run synchronously with 5-minute timeout.
- Authentication: Secure password-based and/or OIDC (SSO) authentication with proper session management.
- REST API: Full REST API with optional API key authentication for external integrations.
- Docker Support: Runs entirely from a Docker container.
- Easy Setup: Quick presets for common cron schedules.
Join the discord server for more info
Hey there! 👋 Just a friendly heads-up: I'm a big believer in open source and love sharing my work with the community. Everything you find in my GitHub repos is and always will be 100% free. If someone tries to sell you a "premium" version of any of my projects while claiming to be me, please know that this is not legitimate. 🚫
If you find my projects helpful and want to fuel my late-night coding sessions with caffeine, I'd be super grateful for any support! ☕
- Create a
docker-compose.ymlfile with this minimal configuration:
# For all configuration options, see howto/DOCKER.md
services:
cronmaster:
image: ghcr.io/fccview/cronmaster:latest
container_name: cronmaster
user: "root"
ports:
- "40123:3000"
environment:
- NODE_ENV=production
- DOCKER=true
- NEXT_PUBLIC_CLOCK_UPDATE_INTERVAL=30000
- AUTH_PASSWORD=very_strong_password
- HOST_CRONTAB_USER=root
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./scripts:/app/scripts
- ./data:/app/data
- ./snippets:/app/snippets
pid: "host"
privileged: true
restart: always
init: true📖 For all available configuration options, see howto/DOCKER.md
cr*nmaster includes a REST API for programmatic access to your checklists and notes. This is perfect for integrations.
📖 For the complete API documentation, see howto/API.md
cr*nmaster supports any OIDC provider (Authentik, Auth0, Keycloak, Okta, Google, EntraID, etc.)
📖 For the complete SSO documentation, see howto/SSO.md
cr*nmaster officially support some languages and allows you to create your custom translations locally on your own machine.
📖 For the complete Translations documentation, see howto/TRANSLATIONS.md
The application supports both AMD64 and ARM64 architectures:
For AMD64 users: No changes needed - the default configuration works out of the box.
For ARM64 users: Uncomment the platform line in your docker-compose.yml:
platform: linux/arm64Note: Multi-platform Docker images are automatically built for both architectures. The image will automatically use the correct architecture for your platform.
- Build and run with Docker Compose:
docker compose up --build- Open your browser and navigate to
http://localhost:40123
Note: The Docker implementation uses direct file access to read and write crontab files, ensuring real-time synchronization with the host system's cron jobs. This approach bypasses the traditional crontab command limitations in containerized environments
- Install dependencies:
yarn install- Run the development server:
yarn dev- Open your browser and navigate to
http://localhost:3000
📖 For the complete environment variables reference, see howto/ENV_VARIABLES.md
This includes all configuration options for:
- Core application settings
- Docker configuration
- UI customization
- Logging settings
- Authentication (password, SSO/OIDC, API keys)
- Development and debugging options
- Root user is required for cron operations and direct file access. There is no way around this, if you don't feel comfortable in running it as root feel free to run the app locally with
yarn install,yarn buildandyarn start - The
DOCKER=trueenvironment variable enables direct file access mode for crontab operations. This is REQUIRED when running the application in docker mode. - The Docker socket and data volume mounts are required for proper functionality
Important Note on Root Commands: When running commands as root within Cronmaster, ensure that these commands also function correctly as root on your host machine. If a command works as root on your host but fails within Cronmaster, please open an issue with detailed information.
Cr*nMaster supports multiple authentication methods to secure your instance:
Set a password to protect access to your Cronmaster instance:
environment:
- AUTH_PASSWORD=your_secure_passwordUsers will be prompted to enter this password before accessing the application.
Cr*nMaster supports SSO via OIDC (OpenID Connect), compatible with providers like:
- Authentik
- Auth0
- Keycloak
- Okta
- Entra ID (Azure AD)
- And many more!
For detailed setup instructions, see README_SSO.md
Quick example:
environment:
- SSO_MODE=oidc
- OIDC_ISSUER=https://your-sso-provider.com
- OIDC_CLIENT_ID=your_client_id
- APP_URL=https://your-cronmaster-domain.comYou can enable both password and SSO authentication simultaneously:
environment:
- AUTH_PASSWORD=your_password
- SSO_MODE=oidc
- OIDC_ISSUER=https://your-sso-provider.com
- OIDC_CLIENT_ID=your_client_idThe login page will display both options, allowing users to choose their preferred method.
- ✅ Secure session management with cryptographically random session IDs
- ✅ 30-day session expiration with automatic cleanup
- ✅ HTTP-only cookies to prevent XSS attacks
- ✅ Proper JWT verification for OIDC tokens using provider's public keys (JWKS)
- ✅ PKCE support for OIDC authentication (or confidential client mode)
Cr*nMaster provides a full REST API for programmatic access. Perfect for:
- External monitoring tools
- Automation scripts
- CI/CD integrations
- Custom dashboards
Protect your API with an optional API key:
environment:
- API_KEY=your-secret-api-key-hereUse the API key in your requests:
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://your-domain.com/api/cronjobsFor complete API documentation with examples, see howto/API.md
GET /api/cronjobs- List all cron jobsPOST /api/cronjobs- Create a new cron jobGET /api/cronjobs/:id- Get a specific cron jobPATCH /api/cronjobs/:id- Update a cron jobDELETE /api/cronjobs/:id- Delete a cron jobPOST /api/cronjobs/:id/execute- Manually execute a jobGET /api/scripts- List all scriptsPOST /api/scripts- Create a new scriptGET /api/system-stats- Get system statisticsGET /api/logs/stream?runId=xxx- Stream job logsGET /api/events- SSE stream for real-time updates
The application automatically detects your operating system and displays:
- System Uptime
- Memory Usage
- CPU Information
- GPU Information (if supported)
- View Existing Jobs: All current cron jobs are displayed with their schedules and commands
- Create New Jobs: Use the form on the right side to create new cron jobs
- Quick Presets: Click on preset buttons for common schedules
- Add Comments: Include descriptions for your cron jobs
- Delete Jobs: Remove unwanted cron jobs with the delete button
- Clone Jobs: Clone jobs to quickly edit the command in case it's similar
- Enable Logging: Optionally enable execution logging for any cronjob to capture detailed execution information
CronMaster includes an optional logging feature that captures detailed execution information for your cronjobs:
When you enable logging for a cronjob, CronMaster automatically wraps your command with a log wrapper script. This wrapper:
- Captures stdout and stderr output
- Records the exit code of your command
- Timestamps the start and end of execution
- Calculates execution duration
- Stores all this information in organized log files
- When creating or editing a cronjob, check the "Enable Logging" checkbox
- The wrapper is automatically added to your crontab entry
- Jobs run independently - they continue to work even if CronMaster is offline
Logs are stored in the ./data/logs/ directory with descriptive folder names:
- If a job has a description/comment:
{sanitized-description}_{jobId}/ - If a job has no description:
{jobId}/
Example structure:
./data/logs/
├── backup-database_root-0/
│ ├── 2025-11-10_14-30-00.log
│ ├── 2025-11-10_15-30-00.log
│ └── 2025-11-10_16-30-00.log
├── daily-cleanup_root-1/
│ └── 2025-11-10_14-35-00.log
├── root-2/ (no description provided)
│ └── 2025-11-10_14-40-00.log
Note: Folder names are sanitized to be filesystem-safe (lowercase, alphanumeric with hyphens, max 50 chars for the description part).
Each log file includes:
==========================================
=== CronMaster Job Execution Log ===
==========================================
Log Folder: backup-database_root-0
Command: bash /app/scripts/backup.sh
Started: 2025-11-10 14:30:00
==========================================
[command output here]
==========================================
=== Execution Summary ===
==========================================
Completed: 2025-11-10 14:30:45
Duration: 45 seconds
Exit code: 0
==========================================
Logs are automatically cleaned up to prevent disk space issues:
- Maximum logs per job: 50 log files
- Maximum age: 30 days
- Cleanup trigger: When viewing logs or after manual execution
- Method: Oldest logs are deleted first when limits are exceeded
You can override the default log wrapper by creating your own at ./data/wrapper-override.sh. This allows you to:
- Customize log format
- Add additional metadata
- Integrate with external logging services
- Implement custom retention policies
Example custom wrapper:
#!/bin/bash
JOB_ID="$1"
shift
# Your custom logic here
LOG_FILE="/custom/path/${JOB_ID}_$(date '+%Y%m%d').log"
{
echo "=== Custom Log Format ==="
echo "Job: $JOB_ID"
"$@"
echo "Exit: $?"
} >> "$LOG_FILE" 2>&1- Mount the
./datadirectory to persist logs on the host - The wrapper script location:
./data/cron-log-wrapper.sh. This will be generated automatically the first time you enable logging.
- Logs are stored at
./data/logs/relative to the project directory - The codebase wrapper script location:
./app/_scripts/cron-log-wrapper.sh - The running wrapper script location:
./data/cron-log-wrapper.sh
- Logging is optional and disabled by default
- Jobs with logging enabled are marked with a blue "Logged" badge in the UI
- Logs are captured for both scheduled runs and manual executions
- Commands with file redirections (>, >>) may conflict with logging
- The crontab stores the wrapped command, so jobs run independently of CronMaster
The application uses standard cron format: * * * * *
- First field: Minute (0-59)
- Second field: Hour (0-23)
- Third field: Day of month (1-31)
- Fourth field: Month (1-12)
- Fifth field: Day of week (0-7, where 0 and 7 are Sunday)
- View Existing Scripts: All current user created scripts are displayed with their name and descriptions
- Create New Script: Use the editor and snippets to quickly create scripts for your cron jobs.
- Quick Snippets: Pre-set of snippets, with ability to add new ones. Check README.md in Snippets
- Delete Scripts: Remove unwanted scripts (this won't delete the cronjob, you will need to manually remove these yourself)
- Clone Scripts: Clone scripts to quickly edit them in case they are similar to one another.
- Next.js 14: React framework with App Router
- TypeScript: Type-safe JavaScript
- Tailwind CSS: Utility-first CSS framework
- Lucide React: Beautiful icons
- next-themes: Dark/light mode support
- Docker: Containerization
- Fork the repository
- Create a feature branch from the
developbranch - Make your changes
- Submit a pull request to the
developbranch
I would like to thank the following members for raising issues and help test/debug them!
|
hermannx5 |
edersong |
corasaniti |
abhisheknair |
mariushosting |
|
DVDAndroid |
ActxLeToucan |
mrtimothyduong |
cerede2000 |
Navino16 |
This project is licensed under the MIT License.
For issues and questions, please open an issue on the GitHub repository.