How to run a cron job automatically after a server reboot

This article explains how to automatically execute a cron job  a server reboot. For instance, after a server restarts, you might wish to run a specific script file or program.

To do this, use the @reboot crontab directive in the cron job instead of a particular day or time. For example, the following cron job runs the start_application.sh script file in the user's home directory one time only after the system restarts:

@reboot ${HOME}/start_application.sh
Was this answer helpful?

Related Articles

How to determine high disk usage locations

This article describes how to determine where your account is using the most disk space....

How to disable e-mail notifications from cron jobs

This article demonstrates how to stop receiving e-mail notifications from cron jobs. By default,...

How to manage the inode count

This article defines an inode count, discusses how to calculate it for your account, and how to...

How to monitor resource usage

This article describes how to monitor resource usage using the top and atop commands. Method 1:...

How to use cURL

This article describes how to use the cURL program to transfer files from the command line. When...