How to add cron job on hosting?

Hosting account allows you to add recurring cron jobs. It is a special program to periodically call up commands, which allow you to automate activities related to the operation of your website or shop.

Adding cron task on hosting

  1. Log in to Your cPanel account.
  2. In the Advanced section, click on "Cron Jobs".
    dd cron job - step 1
  3. On new page, complete fields of form for adding a cron job accordingly:
    Add cron job - step 2
    • Common settings - a predefined list of the most common cron job schedulers to choose from,
      NOTE: selecting any item from this list will automatically complete the fields: minute, hour, day, month and working day,
    • Minute - minute that the cron job command is to be run,
    • Hour - hour at which the cron job command is to be run,
      NOTE: UTC time zone is set on servers, therefore it is necessary to take a correction for the time shift relative to the local user's time, e.g. CEST timezone.
    • Day - day on which the cron job command is to be run,
    • Month - month in which the cron job command is to be run,
    • Working day - on which day of the week the cron job command is to be run,
    • Command - a command to be run by a cron job. Below are some examples of commands:
      • calling a PHP script with full mute:
        /usr/local/bin/php /home/thecamels/public_html/cron.php >/dev/null 2>&1
      • calling a PHP script using a specific version of PHP:
        /usr/local/bin/ea-php73 /home/thecamels/public_html/cron.php >/dev/null 2>&1
      • calling up the website address:
        /usr/bin/curl "https://thecamels.eu/modules/import/import.php?file1=6455345&securekey=osnfcodnwoe2wd29293"
      • calling the website address with full mute:
        /usr/bin/curl "https://thecamels.eu/modules/import/import.php?file1=6455345&securekey=osnfcodnwoe2wd29293" >/dev/null 2>&1
  • cron, hosting, cykliczne zadanie, automatyzacja, cron task, zadanie cron
  • 9 Users Found This Useful
Was this answer helpful?

Related Articles

What DNS server addresses do we have?

At Thecamels we have two DNS servers that work in a cluster to ensure continuous service in case...

Why do I get 500 - Internal Server Error?

When you upload  website to the server and then open it, error "500 - Internal Server Error" can...

How do I fix a session cleaning error in PrestaShop?

In order to fix the problem, please contact us via Client Area. Problem occurs due to incorrect...

How to edit host file in system

Hosts file role, is to translate friendly domain names into their numerical equivalents, i.e. IP...

Why my hosting account has been blocked?

An account may be suspended for several reasons, which are listed below:  No payment for...