Skip to content

Instantly share code, notes, and snippets.

@alexgarrettsmith
Created December 8, 2017 20:31
Show Gist options
  • Save alexgarrettsmith/229a44361fb3bb38e6e1549f1c9fdf6a to your computer and use it in GitHub Desktop.
Save alexgarrettsmith/229a44361fb3bb38e6e1549f1c9fdf6a to your computer and use it in GitHub Desktop.
<?php
while (true) {
$kernel = new Kernel;
Reminder::get()->each(function ($reminder) use ($kernel, $container) {
$kernel->add(new SendReminder($container->guzzle, $reminder, $container->settings))->cron($reminder->expression);
});
$kernel->run();
sleep(60);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment