Adds or extends a `provirted.phar cron` subcommand invocation in `vps_cron.sh` or `qs_cron.sh`. Understands the cron lock pattern (`/dev/shm/lock`), age-based stale-check with `.cron.age`, `.enable_workerman` flag, and log append to `cron.output`. Use when asked to 'add a cron step', 'schedule a task', 'run something in the vps cron', or modify `vps_cron.sh`/`qs_cron.sh`. Do NOT use for workerman timer-based tasks (setupTimers.php).
Adds or extends a `provirted.phar cron` subcommand invocation in `vps_cron.sh` or `qs_cron.sh`. Understands the cron lock pattern (`/dev/shm/lock`), age-based stale-check with `.cron.age`, `.enable_workerman` flag, and log append to `cron.output`. Use when asked to 'add a cron step', 'schedule a task', 'run something in the vps cron', or modify `vps_cron.sh`/`qs_cron.sh`. Do NOT use for workerman timer-based tasks (setupTimers.php).
provirted-cron-task
Critical
Never add steps outside the if [ $old_cron -eq 1 ]; then … else block — the guard at the top of both scripts exits early for /dev/shm/lock and defers to workerman when .enable_workerman exists.
Never modify the lock/age/workerman guard block (lines 9–36 in both scripts). Only add inside the else branch of the $count -ge 2 check.
All new invocations must append to $log (>> $log 2>&1) — never redirect to a new file unless the task is a background fire-and-forget (pattern: 2>$dir/cron.<name> >&2 &).
qs_cron.sh passes -a to every provirted.phar cron call; vps_cron.sh does not. Match the existing flag style for the target script.
Do NOT reference anything under unused/ — those scripts are deprecated.
Instructions
Identify the target script. VPS tasks → vps_cron.sh; QuickServer tasks → qs_cron.sh. Read the file before editing.