Have a Question?

Categories

Setup a cron job

You are here:
< All topics
Table of contents

There are two options for setting.

  1. 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

  2. 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.

Was this article helpful?
0 out Of 5 Stars
5 Értékelés 0%
4 Értékelés 0%
3 Értékelés 0%
2 Értékelés 0%
1 Értékelés 0%
How can we correct this article?
Please submit the reason for your vote so that we can improve the article.