A Cockpit plugin for managing systemd timers through a user-friendly web interface. This plugin allows system administrators to create, edit, delete, and monitor systemd timers without having to use the command line.
- View all systemd timers in a clean, sortable table interface
- Create new timers with an easy-to-use form
- Edit existing timers to modify their schedule, command, or other properties
- Start, stop, and run timers and their associated services
- Delete timers that are no longer needed
- View logs for timer services directly in Cockpit's journal viewer
- Filter and search to quickly find specific timers
- Schedule validation to ensure your timer schedules are correctly formatted
- Schedule examples for common use cases
- A Linux system with systemd
- Cockpit installed (version 122 or later)
- Administrative privileges
-
Clone this repository:
git clone https://github.com/yourusername/systemd-timer-manager.git
-
Create the plugin directory if it doesn't exist:
sudo mkdir -p /usr/share/cockpit/systemd-timer-manager
-
Copy the plugin files:
sudo cp -r systemd-timer-manager/* /usr/share/cockpit/systemd-timer-manager/ -
Restart Cockpit:
sudo systemctl restart cockpit
-
Access Cockpit in your browser (usually at https://your-server-ip:9090) and look for "Timer Manager" in the menu.
sudo dnf install cockpit-systemd-timer-managerThe main view displays all systemd timers on your system with the following information:
- Timer name
- Description
- Last run time
- Next scheduled run time
- Current status
- Action buttons
- Click the "Create New Timer" button
- Fill in the required fields:
- Timer Name: A unique name for your timer (without .timer extension)
- Description: What the timer does
- Schedule: When the timer should run (see below for format)
- Command: The command to execute
- Optional fields:
- Run as User: Username to run the command as
- Persistent: Whether to run immediately if a scheduled time was missed during system downtime
- Run on Boot: Whether to run once after system boot
- Run on Unit Activation: Whether to run when the unit becomes active
- Click "Save"
The schedule field accepts systemd calendar time specifications:
daily- Run once a day at midnightweekly- Run once a week at midnight on Mondaymonthly- Run once a month at midnight on the first dayyearly- Run once a year at midnight on January 1st*:0/15- Run every 15 minutesMon..Fri 09:00- Run at 9 AM on weekdaysSat,Sun 10:00- Run at 10 AM on weekends*-*-01 02:00- Run at 2 AM on the first day of every month
You can validate your schedule format using the "Validate Schedule" button.
For each timer, you can:
- Edit: Modify the timer's properties
- Start/Stop: Enable or disable the timer
- Run Now: Execute the timer's service immediately
- View Logs: See the output from previous runs
- Delete: Remove the timer from the system
index.html- Main HTML filecss/- CSS stylesheetsjs/- JavaScript files:main.js- Entry point and initializationsystemd-service.js- Backend service for interacting with systemdui-controller.js- UI controller handling user interactions
manifest.json- Cockpit plugin manifest
-
Clone the repository:
git clone https://github.com/yourusername/systemd-timer-manager.git cd systemd-timer-manager -
Make your changes to the source files
-
Test the plugin:
mkdir -p ~/.local/share/cockpit/systemd-timer-manager cp -r * ~/.local/share/cockpit/systemd-timer-manager/
-
Restart Cockpit and test your changes
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- The Cockpit Project team for creating an excellent web-based server manager
- The systemd developers for their powerful timer functionality
