Timers

Just like cronjobs. But better.

To get started with a timer, you need a timeable to provide an user context. At the moment, this is limited to a site.

Getting started

Choose your project from the project overview and click the timer-icon . You will now see a table and a button, labeled with "Add timer". Click on this button to create a new timer.

Description

Briefly describe what this timer is about.

Site

As mentioned before, a timer needs a timeable. Choose an existing site.

Binary

You can choose between:

  • Bash
  • PHP (if the chosen site does support PHP)

The chosen binary will be used to execute the script provided as .

File path

Enter the path to the script that should be executed.

This path is to be read under the site user's home directory. For example, /.local/bin/test.sh is interpreted as /home/<site-user>/.local/bin/test.sh.

Schedule

The timer must know when to be executed. As rootli uses systemd-timers, we are providing fixed schedule or dynamic intervals.

Fixed

A fixed schedule is determined by a selection of days a timer should be executed and a time. A typical fixed schedule would be Mo, Fr, Sun 11:15:00.

Interval

An interval-based schedule is executed every n/unit, e.g. every 5 minutes.

Examples

WP-Cron

A WP-cron should run every minute. To archive this, create a new timer with the following parameters:

  • Description: WP-Cron
  • Site: Choose the site, e.g., example.org
  • Binary: PHP
  • File path: /www/<example.org>/wp-cron.php
  • Schedule
    • Type: Interval
    • Interval value: 1
    • Interval: Minutes