Skip to content

Instantly share code, notes, and snippets.

@SebSept
Forked from Shagshag/cron.php
Last active March 15, 2020 10:40
Show Gist options
  • Save SebSept/ed3c925fdb2c60ddd7f050773e7c32d8 to your computer and use it in GitHub Desktop.
Save SebSept/ed3c925fdb2c60ddd7f050773e7c32d8 to your computer and use it in GitHub Desktop.
<?php
class BackupDatabaseCronModuleFrontController extends ModuleFrontController
{
public function init()
{
try {
$this->checkAccess();
$this->module->cron();
header( "backup ok", true ,200 );
}
catch(BackupDatabaseException $e) {
header( $e->getMessage(), true , 400 );
}
exit();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment