pw-scheduling
Use when creating, scheduling, or managing time-based tasks in ProcessWire via the CronExpression wrapper.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when creating, scheduling, or managing time-based tasks in ProcessWire via the CronExpression wrapper.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Use when building, structuring, or refactoring native backend modules for ProcessWire using PHP 8.4 and strict typing.
Use when designing, structuring, or rendering HTML for ProcessWire Admin interfaces, custom Process modules, or Inputfields.
Use when brainstorming or designing ProcessWire modules, templates, field schemas, or hooks to resolve ambiguity and validate architecture before implementation.
Use when creating, executing, or managing Pest tests within ProcessWire or ProcessWire modules, including Test-Driven Development (TDD) tasks.
Use when encountering any bug, test failure, blank screen of death, or unexpected behavior in ProcessWire before proposing fixes.
Use when creating or updating module documentation, package READMEs, architecture guides, or CLI command references for ProcessWire projects.
| name | pw-scheduling |
| description | Use when creating, scheduling, or managing time-based tasks in ProcessWire via the CronExpression wrapper. |
| risk | safe |
| source | processwire-boost |
| date_added | 2026-04-09 |
This system implements a Laravel-inspired Task Scheduler for ProcessWire via the processwire-console package using dragonmantank/cron-expression.
wire schedule:run to cron once and control specific schedules within PHP classes.site/schedule/*Task.php (global) or site/modules/[ModuleName]/schedule/*Task.php (module-scoped).Task (e.g., CleanupLogsTask) and match their filenames.Totoglu\Console\Scheduling\Task.A task specifies what happens (handle()) and when it happens (schedule()).
<?php
declare(strict_types=1);
namespace Site\Schedule;
use Totoglu\Console\Scheduling\Task;
use Totoglu\Console\Scheduling\Event;
class ClearCachesTask extends Task
{
public function schedule(Event $schedule): void
{
// Define frequency
$schedule->dailyAt('04:00');
}
public function handle(): void
{
$this->wire->cache->deleteAll();
\Laravel\Prompts\info("Caches cleared by scheduler.");
}
}
Event Wrapper->everyMinute()->everyFiveMinutes()->hourly()->daily()->dailyAt('13:00')->weekly()->monthly()->cron('* * * * *') (custom raw expressions)wire make:task {Name} - Autogenerates a class within site/schedule/.wire schedule:run - Runs all tasks that are currently due. (This is what you put in the server's crontab as * * * * * cd /path-to-project && php vendor/bin/wire schedule:run).handle(). Instead, handle() should dispatch a Queue job (Queue::push('SyncUsersQueue', [])).UpdateProfiles.php is invalid. It must be UpdateProfilesTask.php.