/flarum-ext-url-cron

Expose the Flarum scheduler to a URL for use on shared hosting envs

Primary LanguagePHPMIT LicenseMIT

URL Cron

License Latest Stable Version Total Downloads

A Flarum extension. Expose the Flarum scheduler to a URL for use on shared hosting envs

Installation

Install with composer:

composer require ianm/url-cron:"*"

Updating

composer update ianm/url-cron

Usage

When running Flarum on shared hosting, some providers do not allow CLI access in order to setup a cron job for the Flarum Scheduler, but instead offer a solution to trigger a URL in order to accomplish the same goal. This extension exposes {FORUM_URL}/api/cron/trigger, which in turn calls the CLI command php flarum schedule:run.

Currently, there is no protection on this endpoint, although authorization may be (optionally) added in the future as needs dictate.

Links