Webcron management is an easy-to-use interface to manage cronjobs running on a publicly available http-location.
### Known bugs
* Datepicker ([Tempus dominus v6](https://getdatepicker.com/)) is currently alpha-quality software. Altough [the dev states it is usable](https://jonathanpeterson.com/posts/state-of-my-datetime-picker-part-2.html)
## Deploying
### Requirements for web-server
* php <= 8.0
* ext-openssl
* ext-pcntl (highly recommended)
* MySQL/MariaDB
* Ability to change the webroot directory
* Ability to run a script as daemon (eg. supervisor or systemd units)
The webcron interface should now work as expected.
## Upgrading
### Requirements
Same requirements and deploying
## Common pitfalls
### Cronjobs are not running
Did you edit the crontab?
### Procedure
1. Remove all files except .env from the webserver
2. Upload the new build to the webserver
3. Run `php bin/console doctrine:migrations:migrate` to migrate the database
## Common pitfalls
### 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.
* Auto-generated Migration: Please modify to your needs!
*/
final class Version1000 extends AbstractMigration
{
public function getDescription(): string
{
return 'Create initial database';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE job (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(100) NOT NULL, `data` LONGTEXT NOT NULL, `interval` INT NOT NULL, nextrun INT NOT NULL, lastrun INT DEFAULT NULL, running INT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE run (id INT AUTO_INCREMENT NOT NULL, job_id INT DEFAULT NULL, exitcode VARCHAR(15) NOT NULL, output LONGTEXT NOT NULL, runtime DOUBLE PRECISION NOT NULL, timestamp INT NOT NULL, flags VARCHAR(5) NOT NULL, INDEX IDX_5076A4C0BE04EA9 (job_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('CREATE TABLE user (id INT AUTO_INCREMENT NOT NULL, email VARCHAR(100) NOT NULL, password VARCHAR(60) NOT NULL, sendmail TINYINT(1) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
public function __construct(KernelInterface $kernel, ManagerRegistry $doctrine, UserPasswordHasherInterface $passwordHasher)
public function __construct(KernelInterface $kernel, ManagerRegistry $doctrine, UserPasswordHasherInterface $passwordHasher, ParameterBagInterface $params)
{
$this->kernel = $kernel;
$this->doctrine = $doctrine;
$this->passwordHasher = $passwordHasher;
$this->params = $params;
parent::__construct();
}
protected function configure()
{
$this
->setDescription('User stuff')
->setHelp('The command is doing user stuff')
->addArgument('action', InputArgument::REQUIRED, 'What action should be executed? [add, delete, update]', null, ['add', 'update', 'delete'])
->addOption('username', 'u', InputOption::VALUE_OPTIONAL, 'What action should be executed? [add, delete, update]', '')
->addOption('password', 'p', InputOption::VALUE_OPTIONAL, 'What action should be executed? [add, delete, update]', '');
}
protected function initialize(InputInterface $input, OutputInterface $output)
protected function initialize(InputInterface $input, OutputInterface $output) : void