PHP-FPM timers: startup, enablement and verification after reboot
Start three PHP-FPM maintenance timers, explain their schedules, and verify their autostart after a reboot.
After PHP-FPM startup, enable its three prepared maintenance timers separately. Two belong to application-pool users; the third maintains the master-process log. Original files and approvals remain intact.
Evidence required before startup
The prerequisites are full original history, accepted PHP startup and the original maintenance approval. PHP_MAINTENANCE_REFERENCE points to the initial plan and completion. PHP_STARTUP_BOOT_REQUEST confirms the boot on which PHP-FPM startup occurred; the current timer request is supplied separately.
HISTORY_INPUTS=(
--root-env-file "$ORIGINAL_ROOT_ENV"
--env-file "$ADMIN_ENV"
--request-file "$FIRST_POSTBOOT_REQUEST"
--current-request-file "$STARTUP_BOOT_REQUEST"
--references-file "$RUNTIME_REFERENCES"
--fpm-file "$FPM_PROFILE"
--key-file "$PUBLIC_REPOSITORY_KEY"
--key-sha256 "$PUBLIC_REPOSITORY_KEY_SHA256"
--firewall-pin-file "$FIREWALL_REFERENCE"
)
TIMER_INPUTS=(
"${HISTORY_INPUTS[@]}"
--php-startup-request-file "$PHP_STARTUP_BOOT_REQUEST"
--activation-file "$PHP_ACTIVATION_REFERENCE"
--php-startup-plan-file "$PHP_STARTUP_PLAN"
--php-startup-plan-sha256 "$PHP_STARTUP_PLAN_SHA256"
--php-startup-manifest-sha256 "$PHP_STARTUP_MANIFEST_SHA256"
--maintenance-reference-file "$PHP_MAINTENANCE_REFERENCE"
)
A separate plan for three timers
"$DEPLOY_CLI" host runtime-startup timers prepared-plan \
"${TIMER_INPUTS[@]}" --plan-file "$TIMER_STARTUP_PLAN"
Apply starts and enables only the three selected timers. The owned approved oneshot services are not used to reinstall the runtime or repeat PHP startup. A separate verify then reads actual states and enable links again.
"$DEPLOY_CLI" host runtime-startup timers prepared-apply \
"${TIMER_INPUTS[@]}" --plan-file "$TIMER_STARTUP_PLAN" \
--plan-sha256 "$TIMER_STARTUP_PLAN_SHA256" --approve-privileges
"$DEPLOY_CLI" host runtime-startup timers prepared-verify \
"${TIMER_INPUTS[@]}" --plan-file "$TIMER_STARTUP_PLAN" \
--plan-sha256 "$TIMER_STARTUP_PLAN_SHA256"
How scheduling is defined
This is the /etc/systemd/system/deploy-cli-php85-master-care.timer file from the fixture. OnActiveSec measures from timer activation; OnUnitActiveSec measures from the most recent activation of the associated service. These are monotonic intervals, not a calendar date.
[Unit]
Description=Owned PHP85 maintenance schedule
[Timer]
OnActiveSec=30min
OnUnitActiveSec=30min
Unit=deploy-cli-php85-master-care.service
[Install]
WantedBy=timers.target
Verification after reboot
After a separate reboot, supply a new independent console confirmation. Boot verification reads actual timer states, enable links, scheduling and PHP readiness. The original manifest authenticates unchanged approvals.
"$DEPLOY_CLI" host runtime-startup timers prepared-boot-verify \
"${TIMER_INPUTS[@]}" --plan-file "$TIMER_STARTUP_PLAN" \
--plan-sha256 "$TIMER_STARTUP_PLAN_SHA256" \
--manifest-sha256 "$TIMER_STARTUP_MANIFEST_SHA256" \
--new-boot-request-file "$NEW_BOOT_REQUEST" \
--output-file "$TIMERS_NEW_BOOT_PROOF"
systemctl list-timers --all 'deploy-cli-php85-*'
systemctl show deploy-cli-php85-master-care.timer \
--property=ActiveState,SubState,UnitFileState,NextElapseUSecMonotonic
The result after reboot
Following a separate reboot, all three timers were active/waiting and enabled. Verification read their schedules and enable links again together with PHP-FPM readiness. Apply enables the timers; systemd subsequently invokes the maintenance oneshot services according to their schedules. The full CLI wizard and educational VPS have separate verification.
Selected actual fields from a separate systemd read after reboot:
Id=deploy-cli-php85-care-s200admin.timer
ActiveState=active
SubState=waiting
UnitFileState=enabled
Id=deploy-cli-php85-care-s200front.timer
ActiveState=active
SubState=waiting
UnitFileState=enabled
Id=deploy-cli-php85-master-care.timer
ActiveState=active
SubState=waiting
UnitFileState=enabled