1. Home
  2. Control Panel
  3. Setting a task to run at startup
  1. Home
  2. Terminal Access
  3. Setting a task to run at startup

Setting a task to run at startup

Overview

Services or scripts may be set to run upon server start within the control panel or via crontab(5) from the terminal. Either solution requires task scheduling support, which is found on Enhanced or higher packages.

Within the control panel

Visit Dev > Task Scheduler to add a new routinely scheduled task. Command syntax follows the same as a normal task, but for the time specification, select @reboot. The job will start on server start. If there are issues with starting the application or the application fails to remain running, then it will remain down.

From the terminal

Use crontab -e to edit your crontab. Instead of specifying a time (min/hour/day/day of week/day of month), specify @reboot, e.g.

@reboot touch /tmp/restart

Updated on April 7, 2020

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help! If you get an error, visit https://lithiumhosting.com/support instead.
Contact Support