Download cron.php from pnacorp/AIKEEDO: direct link, hf CLI and curl.
- Browser
- Download file 718 Bytes
-
https://huggingface.co/pnacorp/AIKEEDO/resolve/main/cron.php
- Command line
-
hf download hf://pnacorp/AIKEEDO/cron.php
-
curl -L -o cron.php https://huggingface.co/pnacorp/AIKEEDO/resolve/main/cron.php
718 Bytes
| declare(strict_types=1); | |
| use Cron\Domain\Events\CronEvent; | |
| use Doctrine\ORM\EntityManagerInterface; | |
| use Psr\Container\ContainerInterface; | |
| use Psr\Container\NotFoundExceptionInterface; | |
| use Psr\EventDispatcher\EventDispatcherInterface; | |
| // Application start timestamp | |
| define('APP_START', microtime(true)); | |
| /** @var ContainerInterface $container */ | |
| $container = include __DIR__ . '/bootstrap/app.php'; | |
| $dispatcher = $container->get(EventDispatcherInterface::class); | |
| $dispatcher->dispatch(new CronEvent()); | |
| try { | |
| // Persist data | |
| /** @var EntityManagerInterface $em */ | |
| $em = $container->get(EntityManagerInterface::class); | |
| $em->flush(); | |
| } catch (NotFoundExceptionInterface) { | |
| // Do nothing | |
| } | |