2.5k
GitHub Stars
4
Bundled Files
2 months ago
Catalog Refreshed
3 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill openclaw/skills --skill graceful-restart- _meta.json489 B
- CHANGELOG.md1.5 KB
- graceful-restart.js2.5 KB
- SKILL.md2.7 KB
Overview
This skill performs a graceful restart of the Gateway to preserve and resume the main session context after a reboot. It sets a one-time cron wakeup before restarting, then injects a system event into the main session after startup so interrupted tasks continue automatically. The default wakeup delay is 10 seconds and the skill depends on the OpenClaw CLI environment.
How this skill works
Before issuing a Gateway restart, the skill schedules a one-time cron job that will fire after a short delay (default 10s). The cron job posts a system-event into the main session (--session main) so the main session receives a heartbeat-style message after Gateway recovers. After scheduling the cron, the skill restarts the Gateway and the one-time cron cleans itself up after running (--delete-after-run recommended).
When to use it
- When you need to restart the Gateway without losing the main session context
- When configuration changes require a Gateway restart but you want automatic task recovery
- During maintenance windows where resumed automation must continue without user intervention
- When dealing with agents or long-running tasks that should resume post-reboot
Best practices
- Always run this skill instead of raw exec restart commands; do not use exec openclaw gateway restart directly
- Provide a clear --task description so the main session knows what to resume after reboot
- Adjust the delay with --delay if your Gateway needs more startup time (default 10 seconds)
- Use --delete-after-run to ensure the cron job is removed after it fires
- Verify OpenClaw CLI is available and the skill has permission to schedule cron jobs
Example use cases
- Automatically resume an installation task after Gateway restarts for configuration changes
- Apply a configuration patch, schedule graceful-restart with task text so the main session picks up and completes leftover steps
- Trigger a pre-planned maintenance reboot while ensuring bot conversations or workflows automatically continue
- Use a longer delay for slow environments by calling the skill with --delay 60 to avoid missed wakeups
FAQ
Confirm the OpenClaw CLI is available, the cron job executed, and the scheduled system-event targeted --session main. Increase the delay to ensure Gateway services are fully up before the wakeup.
How do I change the wakeup timing?
Pass --delay <seconds> when running the skill. The default is 10 seconds; increase this if the Gateway needs more time to boot.