What Do I Put for the Cron Job Command ?

Linux web hosting contains the following: Shared, Reseller, VPS and Dedicated. The instructions below are suitable with Shared Reseller, SEO hosting and VPS and Deddicated Servers with Easy Apache 3 installed; these instructions will not work on Windows Hosting or VPS with Plesk.

Command line illustrations only! Bold segments must be changed.


PHP Commands

Run a PHP5 cron job:
php /home/username/public_html/cron.php

Optional flags are sometimes required for a PHP cron job:
php -q /home/username/public_html/cron.php

Run a PHP4 cron job:
/usr/local/php4/bin/php /home/strong>username/public_html/cron.php

Use a specific php.ini file:
php -c /home/username/public_html/php.ini /home/username/public_html/myscript.php

To GET a remote file:
/usr/bin/GET http://www.example.com/file.php
Perl

Run a CGI cron job:
perl /home/username/public_html/cgi-bin/file.pl
SSH

Run a code script cron job:
/bin/sh /home/username/public_html/file.sh

MySQL Commands

Note: It is a sensible practice, do not type your security password out in the following instructions but simply use the -p flag and have the program prompt you for the security password. This is the way your security password remains protected and is never on the server as simply written text.

To import a database:
mysql -u mysql_user -ppassword database_name < backup.sql

To export a database:
mysqldump -u mysql_user -ppassword database_name > backup.sql
Custom Installations without Easy Apache 3 (VPS/Dedicated)
PHP

To run for a PHP5 cron job:
/usr/local/php5/bin/php5 /home/username/public_html/cron.php

To run for a PHP4 cron job:
/usr/bin/php /home/username/public_html/cron.php
  • 7 istifadəçi bunu faydalı hesab edir
Bu cavab sizə kömək etdi?

Related Articles

What is a subdomain name? How do I create and delete one?

It is not always necessary to sign-up a new domain when the one you already own will continue to...

Improve the Security of your WordPress website

Reprise Hosting offers WordPress to all customers through Softaculous, which can be found in the...

How to Enable cPHulk Brute Force Protection on Your Dedicated or VPS Server

You may wonder why you need cPHulk Brute Force Protection. The answer is simple, it provides...

How to generate/download a full backup

A complete back-up is a back-up of all of your information, e-mail, data source, etc. To run a...

What is the difference between parked, addon, and subdomains?

A Subdomain is a second web page, with its own original material, but there is no new domain...