cron runs commands for you at set times: every hour, every night, every Monday. On App Hosting, every user has their own list of such jobs, called the crontab. The steps were tested on our demo service.

Connect over SSH first: SSH how to get connected.


1. Look at Your Crontab First

crontab -l

Your crontab is not empty: the Client Area adds a line for some of your apps, for example:

*/5 * * * * /bin/bash ~/software/cron/qbittorrent

Every five minutes, such a line checks that the app is running and starts it again if it has stopped. Do not change or delete these lines. Add your own jobs below them.

2. How a Line Is Built

Each line is one job: five fields for the time, then the command.

FieldMeaningExample
1Minute (0–59)30
2Hour (0–23)4
3Day of the month (1–31)* = every day
4Month (1–12)* = every month
5Day of the week (0–7, 0 and 7 are Sunday)1 = Monday

Examples:

  • 30 4 * * *: every day at 04:30.
  • 0 * * * *: at the start of every hour.
  • */15 * * * *: every 15 minutes.
  • 0 6 * * 1: every Monday at 06:00.

The times are those of the server, which may differ from yours. Run date to see the time of the server.

3. Add a Job

crontab -e

The first time, it may ask you to Select an editor: type the number of nano and press Enter. Go to the end of the list with the arrow keys and add your line, for example a job that writes the date and time into a file every morning:

0 6 * * * date >> $HOME/cron-test.log 2>&1

Save with Ctrl+O and Enter and close with Ctrl+X. The answer crontab: installing new crontab means the list is saved and active.

4. Check That It Runs

To test a job, let it run every minute for a moment: * * * * *. The >> $HOME/….log 2>&1 at the end of the line writes everything the command prints into a file, also errors, so you can see what happened:

cat ~/cron-test.log

A job set to every minute writes its first line at the start of the next minute, and one more each minute after that. Each line is the date and time of the server, for example:

Mon Nov 30 07:20:01 AM -01 2026

When it works, replace date with your own command and set the time you want with crontab -e.

5. Remove a Job

Open the list with crontab -e, delete the line of your job, and save. Leave the lines of the Client Area as they are. To pause a job without deleting it, put # at the start of its line.


Good to Know

  • cron runs commands without your login settings: write full paths, for example $HOME/downloads instead of a path relative to your current folder.
  • Keep your jobs light and not too frequent: a command that goes through all your files can run for a long time when you have many of them.
  • A job that deletes files deletes them without asking. Test the command by hand first, and let it only list the files before you let it delete them.
  • For long commands, write them into a script file, for example ~/bin/myjob.sh, make it executable with chmod +x ~/bin/myjob.sh, and run the script from cron.
Was this answer helpful? 0 Users Found This Useful (0 Votes)