A simple webapp to manage cronjobs
Go to file
Jeroen De Meerleer ed733a3561
UPDATED DEPENDENCIES
2022-01-05 15:53:15 +01:00
assets UPDATED DEPENDENCIES 2022-01-05 15:53:15 +01:00
cache Added frontend 2017-04-14 15:58:09 +02:00
config NEW FEATURE: manual runs 2021-06-01 17:41:10 +02:00
lib/Framework BUGFIX: twig never did caching 2021-11-25 15:20:38 +01:00
public ENHANCEMENT: All assets are now in /assets 2021-08-02 13:57:20 +02:00
src BUGFIX: empty string is not null 2021-12-23 11:11:01 +01:00
storage NEW FEATURE: added mailing for failed runs 2021-11-25 15:19:20 +01:00
templates NEW FEATURE: when putting names between brackets it's treated as a tag 2022-01-05 14:56:28 +01:00
.env.sample NEW FEATURE: added mailing for failed runs 2021-11-25 15:19:20 +01:00
.gitignore ENHANCEMENT: Using webpack for assets 2021-05-26 13:16:40 +02:00
LICENSE.md First implementation of the framework 2021-04-06 19:33:26 +02:00
README.md UPDATED DEPENDENCIES 2022-01-05 15:53:15 +01:00
bootstrap.php Added running of jobs 2021-05-24 18:36:16 +02:00
composer.json UPDATED DEPENDENCIES 2021-12-31 15:24:17 +01:00
composer.lock UPDATED DEPENDENCIES 2022-01-05 15:53:15 +01:00
package-lock.json UPDATED DEPENDENCIES 2022-01-05 15:53:15 +01:00
package.json UPDATED DEPENDENCIES 2021-12-31 15:24:17 +01:00
webcron BUGFIX: cachedir was not set 2021-12-04 09:16:29 +01:00
webpack.config.js ENHANCEMENT: All assets are now in /assets 2021-08-02 13:57:20 +02:00

README.md

Webcron Management

(c) 2017-2018, 2021- Jeroen De Meerleer me@jeroened.be

Webcron management is an easy-to-use interface to manage cronjobs running on a publicly available http-location.

Status update

Rewrite is currently beta-quality. Production-use is possible, but use with caution. Personally, I'm using it myself already in a production-like environment.

Known bugs

Deploying

Requirements for web-server

  • php <= 8.0
    • ext-openssl
    • ext-pcntl (highly recommended)
  • MySQL/MariaDB or SQLite
  • Ability to change the webroot directory
  • Ability to run a script as daemon (eg. supervisor or systemd units)

Requirements for build-server

  • php <= 8.0 (incl composer <= 2)
  • NodeJS <= 14.0 (incl. npm <= 7)

Building

Please run following command on the build server

$ composer install --no-dev --optimize-autoloader
$ npm install
$ npx build prod
$ rm -rf node_modules # Node modules are only required for building

Configuration

All configuration can be found in .env.sample. Please copy this to file to .env and change its values

Installation

First follow the build and configuration instructions. If you don't follow them correctly Webcron Management won't work correctly

  1. Create your database and import the storage/database.sql file into the database
  2. Create a first user by inserting a first record to the users table (Password is hashed using the HASHING_METHOD in your .env)
  3. Set up your webhosting to use the /public directory as web root
  4. Upload the repository to the webserver
  5. Set up the daemon script using systemd, supervisord or similar system
    • If this is not possible running the daemon using a cronjob is still possible using below gist (Not recommended)
0 * * * * cd /path/to/webcron/ && php webcron daemon --time-limit=3600 > /dev/null 1&>2

The webcron interface should now work as expected.

Common pitfalls

Cronjobs are not running

Did you edit the crontab?

I can't do an automatic system upgrade!

Doing a system upgrade requires sudo which has a certain number security measurements. To enable running anything with sudo (eg. sudo apt dist-upgrade -y) the user needs to be able to run sudo without tty and password.

TL;DR