Have a Question?
Setup a cron job
Table of contents
There are two options for setting.
- For the file you want to run on a file in a timely manner, at least the owner has to run the run right (0700). Also, at the beginning of the file (in the first line) you have to specify the appropriate interpreter for the file type.
For PHP file:
#!/usr/bin/php
For Shell script:
#!/bin/bash
In this case, the file should be given in the timed scripts menu in the following format: /home/username/public_html/cron.php
- Only enter the interpreter in the Timed Scripts menu before the file to run, in the following format:
For PHP file:
php /home/username/public_html/cron.php
For Shell script:
/bin/sh /home/username/public_html/file.sh
In the latter case, you do not have to configure the file for the file.