Skip to content

Commit ff9253e

Browse files
committed
Cron: use component bootstrap/entry point for runner
1 parent 87dce32 commit ff9253e

2 files changed

Lines changed: 5 additions & 10 deletions

File tree

cli/cron.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@
1818

1919
declare(strict_types=1);
2020

21-
chdir(__DIR__);
22-
chdir('..');
21+
require_once __DIR__ . '/../vendor/composer/vendor/autoload.php';
22+
require_once __DIR__ . '/../artifacts/bootstrap_default.php';
2323

24-
require_once './vendor/composer/vendor/autoload.php';
24+
ilContext::init(ilContext::CONTEXT_CRON);
25+
26+
entry_point('ILIAS Legacy Initialisation Adapter');
2527

2628
$cron = new ILIAS\Cron\CLI\App(
2729
new ILIAS\Cron\CLI\Commands\RunActiveJobsCommand()

components/ILIAS/Cron/classes/class.ilCronStartUp.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,6 @@ public function __construct(
2828
private readonly string $username,
2929
?ilAuthSession $authSession = null
3030
) {
31-
/** @noRector */
32-
ilContext::init(ilContext::CONTEXT_CRON);
33-
34-
// TODO @see mantis 20371: To get rid of this, the authentication service has to provide a mechanism to pass the client_id
35-
$_GET['client_id'] = $this->client;
36-
ilInitialisation::initILIAS();
37-
3831
if (null === $authSession) {
3932
global $DIC;
4033
$authSession = $DIC['ilAuthSession'];

0 commit comments

Comments
 (0)