ianm/url-cron

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

Installs: 266

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

Type:flarum-extension

0.1.1 2023-05-10 08:34 UTC

This package is auto-updated.

Last update: 2024-12-10 12:24:46 UTC


README

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