Add a cron system
Right now polls are expired through a PurgeService that executes randomly on each page call.
The notify before expiration feature (#415) sound heavier and can't be done this way. It's a good occasion to move these tasks to a dedicated job queue.
What it needs to have:
- ability to load through system cron (calling
php -f cron.php
) or just ajax, see what Nextcloud has - save into database
- name (for job type), priority and arguments
- timestamp
run_after
Also https://github.com/peppeocchi/php-cron-scheduler might be worth a look.