PHPackages                             jcore/runner - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. jcore/runner

ActiveWordpress-plugin[Utility &amp; Helpers](/categories/utility)

jcore/runner
============

JCORE Script Runner. A WordPress plugin to easily allow manual running of scripts for maintenance and utility.

v4.1.0(1y ago)02.9k↓33.3%GPL-2.0-onlyPHP

Since Nov 9Pushed 3mo ago2 watchersCompare

[ Source](https://github.com/JCO-Digital/jcore-runner)[ Packagist](https://packagist.org/packages/jcore/runner)[ RSS](/packages/jcore-runner/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (33)Used By (0)

JCORE Script Runner Plugin
==========================

[](#jcore-script-runner-plugin)

A powerful WordPress utility for managing, running, and scheduling maintenance scripts through a clean administrative interface. It handles long-running processes via pagination, provides real-time logging, and supports data exports.

Features
--------

[](#features)

- **Admin UI**: Easily run scripts from the WordPress "Tools" menu.
- **Pagination**: Handle heavy tasks by splitting execution into multiple requests to avoid timeouts.
- **Scheduling**: Built-in support for WP-Cron with customizable intervals.
- **Logging**: Automatically captures `echo` output and saves it to daily log files.
- **Exports**: Built-in `Export` class to generate CSV or JSON files.
- **Input Fields**: Support for user inputs including text, select (with Select2), dates, and file uploads.

Installation
------------

[](#installation)

Install the plugin in your WordPress `wp-content/plugins` directory.

```
cd wp-content/plugins
git clone https://github.com/JCO-Digital/jcore-runner.git
```

Basic Usage
-----------

[](#basic-usage)

To add a script to the runner, use the `jcore_runner_functions` filter.

### 1. Register your script

[](#1-register-your-script)

```
add_filter('jcore_runner_functions', function($scripts) {
    $scripts['my_utility_script'] = [
        'title'    => 'Update Product Meta',
        'callback' => 'my_namespace\update_products_callback',
        'input'    => [
            'batch_size' => [
                'title'   => 'Items per batch',
                'type'    => 'number',
                'default' => 50,
            ],
        ],
    ];
    return $scripts;
});
```

### 2. The Callback Function

[](#2-the-callback-function)

The callback receives an instance of `Jcore\Runner\Arguments`. Any content you `echo` will be displayed in the runner console and saved to logs.

```
namespace my_namespace;

use Jcore\Runner\Arguments;

function update_products_callback(Arguments $args) {
    // Access user input
    $batch_size = $args->input['batch_size'] ?? 10;

    // Access persistent data between pages
    $current_page = $args->page; // Starts at 1

    echo "Processing batch $current_page...\n";

    // Perform your logic here...

    // To continue to the next page (pagination):
    if ($current_page < 5) {
        $args->set_next_page();
        // Pass data to the next iteration
        $args->data['processed_count'] = ($args->data['processed_count'] ?? 0) + $batch_size;
    }

    return $args;
}
```

Advanced Usage
--------------

[](#advanced-usage)

### Input Types

[](#input-types)

The plugin supports various input types for the admin UI:

- `text`, `number`, `email`: Standard HTML inputs.
- `select`: Uses Select2. Requires an `options` array.
- `date`: Uses jQuery UI Datepicker.
- `file`: Allows uploading files which are passed to the callback.

```
'input' => [
    'category' => [
        'title'   => 'Select Category',
        'type'    => 'select',
        'options' => [
            'news' => 'News',
            'tech' => 'Technology',
        ],
        'default' => 'news',
    ],
    'start_date' => [
        'title' => 'Start From',
        'type'  => 'date',
    ]
]
```

### Exporting Data

[](#exporting-data)

You can generate files (CSV/JSON) during execution:

```
function my_export_script(Arguments $args) {
    $args->export->set_extension('csv');
    $args->export->add_row(['ID', 'Name', 'Status']);
    $args->export->add_row([1, 'Test Item', 'Complete']);

    return $args;
}
```

### Status Fields

[](#status-fields)

You can display persistent status information in the runner UI that updates in real-time between paginated requests.

```
// 1. Register the status field
add_filter('jcore_runner_status', function($status) {
    $status['progress_bar'] = 'Current Progress';
    return $status;
});

// 2. Update it in your callback
function my_paginated_script(Arguments $args) {
    $total = 100;
    $current = $args->page * 10;

    // This will update the 'Current Progress' section in the UI
    $args->return['progress_bar'] = "$current / $total items processed";

    if ($current < $total) {
        $args->set_next_page();
    }
    return $args;
}
```

### Scheduling (Cron)

[](#scheduling-cron)

Scripts registered via `jcore_runner_functions` can be scheduled directly from the plugin table in the WordPress admin. The plugin adds custom intervals:

- `every_minute`
- `jcore_hourly`
- `jcore_daily`
- `jcore_weekly`

Hooks &amp; Filters
-------------------

[](#hooks--filters)

- `jcore_runner_functions`: Main filter to register scripts.
- `jcore_runner_title`: Change the page title in Admin.
- `jcore_runner_menu`: Change the menu label.
- `jcore_runner_cron_schedules`: Add custom cron intervals.

Requirements
------------

[](#requirements)

- PHP 8.0+
- WordPress 6.0+

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance64

Regular maintenance activity

Popularity21

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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 ~16 days

Recently: every ~39 days

Total

29

Last Release

479d ago

Major Versions

v1.1.2 → v2.0.02024-01-12

v2.2.0 → v3.0.02024-04-04

v3.1.1-rc.0 → v4.0.02024-08-23

### Community

Maintainers

![](https://www.gravatar.com/avatar/744ed170b0dedcb63d4eee2a7db74cf480a9eb05543fecba1f791a118b2ea3e1?d=identicon)[jcore](/maintainers/jcore)

---

Top Contributors

[![maxemiliang](https://avatars.githubusercontent.com/u/7084690?v=4)](https://github.com/maxemiliang "maxemiliang (44 commits)")[![foonly](https://avatars.githubusercontent.com/u/1481639?v=4)](https://github.com/foonly "foonly (42 commits)")[![maxemilian-jco](https://avatars.githubusercontent.com/u/146197416?v=4)](https://github.com/maxemilian-jco "maxemilian-jco (2 commits)")

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/jcore-runner/health.svg)

```
[![Health](https://phpackages.com/badges/jcore-runner/health.svg)](https://phpackages.com/packages/jcore-runner)
```

###  Alternatives

[rainlab/blog-plugin

Blog plugin for October CMS

17257.7k](/packages/rainlab-blog-plugin)[rainlab/builder-plugin

Builder plugin for October CMS

17147.2k1](/packages/rainlab-builder-plugin)[pfefferle/wordpress-activitypub

The ActivityPub protocol is a decentralized social networking protocol based upon the ActivityStreams 2.0 data format.

5671.4k1](/packages/pfefferle-wordpress-activitypub)[civicrm/civicrm-drupal-8

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

18238.1k2](/packages/civicrm-civicrm-drupal-8)[mediawiki/semantic-glossary

A terminology markup extension with a Semantic MediaWiki back-end

1352.4k](/packages/mediawiki-semantic-glossary)[humanmade/lottie-lite

A lightweight Lottie Animations Extension for WordPress

374.3k](/packages/humanmade-lottie-lite)

PHPackages © 2026

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