What does @reboot do?
The cron entry @reboot runs a command once each time the machine or the cron service starts, instead of on a clock schedule.
Runs once each time the server or the cron service starts. It is handy for starting a small worker or mounting a drive. Some shared hosts, including many cPanel servers, do not allow @reboot for normal users.
Need another time? Change the expression in the box above, or pick a different schedule: the meaning, the next run times and the ready lines for cPanel, crontab, systemd, Kubernetes and GitHub Actions update as you type.
Cron at reboot at a glance
@reboot
Once, every time the server starts.
Variations
- Every 5 minutes as a fallback check
*/5 * * * *
Related schedules
How to use the Cron @reboot
- 1
Check the expression and its meaning above.
- 2
Change the time in the box if you need a different schedule.
- 3
Copy the five cPanel values or the ready line for your system.
Tips for better results
- Use full paths in the command, such as /usr/local/bin/php, because cron starts with a very short PATH.
- Send the output to a log file (>> /home/USER/cron.log 2>&1) while testing, then switch to >/dev/null 2>&1 once it works.
- If one run might still be going when the next one starts, wrap the command in flock -n /tmp/job.lock to skip the overlap.
Your privacy: it stays on your device
- This tool runs entirely in your browser. What you type and the files you choose are processed on your own device and are never sent to our server.
- Nothing is uploaded, stored or kept in a history, so it is safe for private text, documents, photos and keys.
- It keeps working on a slow connection, because no answer has to come back from a server.
Questions people ask
How do I run a cron job at reboot in cPanel?
cPanel's Cron Jobs page has no @reboot option, and many hosts do not allow it. Ask your host, or use a short schedule such as every 5 minutes that checks whether your program is running.
Can I change the time or start it at another minute?
Yes. For example: every 5 minutes as a fallback check: */5 * * * *.
Which time zone does cron use?
The time zone of the server, which is often UTC on hosting and cloud servers. Some cron versions accept CRON_TZ=Africa/Cairo (or another zone) on the line above the job.