---
title: "Setting a task to run at startup"
date: "2016-02-02"
category: "control-panel"
slug: "setting-a-task-to-run-at-startup"
---

You can configure services or scripts to run automatically when the server starts. This requires task scheduling support, available on [Developer+](https://apnscp.com/hosting) packages.

## Using the Control Panel

1. In the [[logging-into-the-control-panel]], navigate to **Dev** > **Task Scheduler**
2. Add a new scheduled task with the desired command
3. For the time specification, select `@reboot`

The job will execute on server start. If the application fails to start or crashes, it will remain down until manually restarted.

## Using the Terminal

Edit your crontab via [[accessing-terminal]] with `crontab -e` and use `@reboot` instead of a time specification:

`@reboot touch /tmp/restart`
