PHPackages                             antonchaikin/f3-scheduler - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. antonchaikin/f3-scheduler

ActiveLibrary[Framework](/categories/framework)

antonchaikin/f3-scheduler
=========================

Cron-based task scheduler for the Fat-Free Framework (F3)

v1.0.3(1y ago)0211MITPHPPHP &gt;=7.4

Since May 28Pushed 1y agoCompare

[ Source](https://github.com/AntonSeagull/f3-scheduler)[ Packagist](https://packagist.org/packages/antonchaikin/f3-scheduler)[ RSS](/packages/antonchaikin-f3-scheduler/feed)WikiDiscussions main Synced today

READMEChangelog (4)Dependencies (2)Versions (5)Used By (0)

F3Scheduler
===========

[](#f3scheduler)

**F3Scheduler** is a simple cron-style task scheduler plugin for the [Fat-Free Framework (F3)](https://fatfreeframework.com). It allows you to register periodic tasks using cron expressions and execute them via a route or CLI-safe handler.

🚀 Features
----------

[](#-features)

- Register tasks using cron expressions or helper methods like `everyMinute()`, `hourly()`, `daily()`, etc.
- Supports callable PHP functions and string commands (executed via `php index.php ...`).
- Flexible error handling via `setErrorHandler(...)`.
- Built-in route: `GET /cron/schedule/run` for triggering tasks from CRON.
- Designed for F3 and easy integration.

🛠 Installation
--------------

[](#-installation)

```
composer require antonchaikin/f3-scheduler
```

🧩 Setup
-------

[](#-setup)

In your app bootstrap:

```
\F3Scheduler\F7SchedulePlugin::register();
```

This will:

- Register the route `GET /cron/schedule/run`
- Bind `Schedule` to `$f3->schedule` for easy static access

🧪 Usage
-------

[](#-usage)

Register a task:

```
$f3->schedule::everyMinute(function () {
    echo "Run every minute!";
});
```

Register a shell command:

```
$f3->schedule::daily("clear-cache");
```

Custom cron:

```
$f3->schedule::on("0 0 1 * *", fn() => echo "Run every 1st of month!");
```

Set error handler:

```
$f3->schedule::setErrorHandler(function ($e) {
    error_log("[SCHEDULE ERROR] " . $e->getMessage());
});
```

Trigger tasks manually (e.g. from cron job):

```
curl https://your-app.com/cron/schedule/run
```

⏰ System Cron Setup
-------------------

[](#-system-cron-setup)

To run scheduled tasks every minute, add the following line to your server's crontab:

```
* * * * * curl -s https://your-app.com/cron/schedule/run > /dev/null 2>&1
```

Make sure the route `/cron/schedule/run` is publicly accessible or secured via IP/user-agent as needed.

📚 Available Methods
-------------------

[](#-available-methods)

- `everyMinute(callable|string)`
- `everyFiveMinute(callable|string)`
- `everyTenMinutes(callable|string)`
- `everyFifteenMinutes(callable|string)`
- `everyThirtyMinutes(callable|string)`
- `hourly(callable|string)`
- `daily(callable|string)`
- `dailyNoon(callable|string)`
- `weekly(callable|string)`
- `monthly(callable|string)`
- `on(string cronExpression, callable|string)`

🧠 Notes
-------

[](#-notes)

- String tasks will be executed using `php ./index.php {your-command}`.
- The route `/cron/schedule/run` accepts only bot/cron-like User-Agents by default. CLI is always allowed.

📄 License
---------

[](#-license)

MIT © Anton Chaikin

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance46

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

4

Last Release

402d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3d12d07cb0b4a9c882178756622fa9c57f281836ff84f530d0129f3d6377811d?d=identicon)[AppTor](/maintainers/AppTor)

---

Top Contributors

[![AntonSeagull](https://avatars.githubusercontent.com/u/20472179?v=4)](https://github.com/AntonSeagull "AntonSeagull (4 commits)")

### Embed Badge

![Health badge](/badges/antonchaikin-f3-scheduler/health.svg)

```
[![Health](https://phpackages.com/badges/antonchaikin-f3-scheduler/health.svg)](https://phpackages.com/packages/antonchaikin-f3-scheduler)
```

###  Alternatives

[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k39.6M297](/packages/laravel-dusk)[nineinchnick/edatatables

Grid widget for the Yii Framework, wrapper for the DataTables jQuery plugin

173.2k](/packages/nineinchnick-edatatables)[link-cloud/fast-hyperf

LinkCloud Fast Hyperf

241.2k1](/packages/link-cloud-fast-hyperf)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
