A simple webapp to manage cronjobs
Go to file
2018-09-13 14:05:31 +02:00
cache Added frontend 2017-04-14 15:58:09 +02:00
css Better usage of bootstrap grid system 2017-04-18 18:54:45 +02:00
images Added loading screen to runnow 2017-04-17 10:10:35 +02:00
include Added dbclean 2018-09-13 12:49:28 +02:00
js Focusout on load-page 2018-09-06 16:40:54 +02:00
nbproject Added frontend 2017-04-14 15:58:09 +02:00
templates Added responsiveness to buttons 2018-09-13 13:16:18 +02:00
.gitignore Added frontend 2017-04-14 15:58:09 +02:00
addjob.php Added expected return value 2018-05-08 21:49:25 +02:00
composer.json Updating dependencies 2018-09-13 14:04:42 +02:00
composer.lock Updating dependencies 2018-09-13 14:04:42 +02:00
config.inc.sample.php Added runner 2017-04-14 15:57:47 +02:00
config.php Added validation of the config 2018-09-13 12:38:12 +02:00
database.sql Updated database 2018-09-13 12:37:00 +02:00
editjob.php Added link to editjob on runs-overview 2018-09-07 15:54:55 +02:00
index.php Changed hash to a even more random hash 2017-05-16 16:05:01 +02:00
LICENSE Updated readme 2017-04-15 13:45:37 +02:00
LICENSE.md Initial commit 2017-04-14 15:51:47 +02:00
overview.php dunkey!! 2018-09-13 12:54:51 +02:00
README.md Updated readme for updated dependencies 2018-09-13 14:05:31 +02:00
runnow.php Saving all runs in database 2018-08-31 11:06:57 +02:00
runs.php Some bugfixes 2018-09-07 13:55:46 +02:00
webcron.php Added dbclean 2018-09-13 12:49:28 +02:00

Webcron Management

(c) 2017 Jeroen De Meerleer me@jeroened.be

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

Requirements

  • Webserver able to run PHP
  • PHP 7.0 or greater
  • MySQL/MariaDB
  • 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.

Licence

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.