A simple webapp to manage cronjobs
Go to file
Jeroen De Meerleer a61dfa10c7
BUGFIX: updated dependencies
2021-10-19 17:30:55 +02:00
assets NEW FEATURE: added datetimepicker 2021-10-18 17:20:08 +02: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 NEW FEATURE: added visual warnings for failed jobs 2021-08-02 17:07:41 +02:00
public ENHANCEMENT: All assets are now in /assets 2021-08-02 13:57:20 +02:00
src BUGFIX: guzzle does not only give request exceptions 2021-10-18 15:17:36 +02:00
storage Failed runs are now saved per run instead of based on global response code 2021-06-01 13:45:57 +02:00
templates BUGFIX: still occurences of error instead of fail 2021-09-03 11:12:43 +02:00
.env.sample NEW FEATURE: added visual warnings for failed jobs 2021-08-02 17:07:41 +02: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 Better structure 2021-04-06 22:20:18 +02:00
bootstrap.php Added running of jobs 2021-05-24 18:36:16 +02:00
composer.json BUGFIX: updated dependencies 2021-10-19 17:30:55 +02:00
composer.lock BUGFIX: updated dependencies 2021-10-19 17:30:55 +02:00
package-lock.json BUGFIX: updated dependencies 2021-10-19 17:30:55 +02:00
package.json BUGFIX: updated dependencies 2021-10-19 17:30:55 +02:00
webcron NEW FEATURE: added cleanup command 2021-07-16 14:31:18 +02: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, 2021 Jeroen De Meerleer me@jeroened.be

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

Status update

I'm currently in the process of rewriting the application to more modern standards. The current main branch is very unstable at the moment. Please don't use it.

I encourage everyone to wait for the new version as upgrading will probably be very difficult.

What will change with the rewrite?

  • All urls will change. eg. /login/ and /jobs/5/edit/ instead of /login.php and editjob.php?jobId=5
  • Dropping support for directly calling webcron.php from url-bar
  • Daemonized main-script which will enable running cronjobs by seconds

Requirements

  • Webserver able to run PHP
  • PHP 8.0 or greater
  • MySQL/MariaDB (Or sqLite)
  • Ability to add a system cronjob for installation (You can maybe ask you webhost?)

Instalation

Follow the instructions below to install the webcron interface

  1. Copy this repository to a public directory on your server
  2. Create a database using the database.sql provided in the repository
  3. Create a first user by inserting a first record to the users table (Password is hashed with bcrypt)
  4. Run composer install to install dependencies.
  5. Open ssh and add following line to your crontab
* * * * cd /path/to/webcron/ && php webcron.php > /dev/null 1&>2

Common pittfalls

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

Can I schedule a reboot every week?

Yes, you can do this by creating a job with reboot as "url". When this job needs to run, the reboot is triggered to run at the very end. At the first run of the master script a list of active and terribly failed services is pushed to the job so you can check this if something is wrong.