Posts Tagged ‘Cron job’

Setting Cron Jobs from SSH

First of all get PuTTY/KiTTY – a SSH and telnet client which offers secure data exchange between two connected devices.

1. Open PuTTY/KiTTY

2. Enter the IP Address and Port name of host server.

putty-login

3. Login with username and password.

login as: root
root@xxx.xxx.xxx.xx's password:
Last login: Sun Dec 13 06:28:52 2010 from xx.xxx.xxx.xxx.srvlist.ukfast.net
[root@xxx ~]#

[Note: xxx refers to IP Address format]

4. To list crontab (if already there)

[root@xxx ~]# crontab –l
*   *  *   * *  lynx -source http://www.domain.co.uk/cron.php >/dev/null  2>&1

[Note: The file cron.php is running every minute, tested with ukfast.co.uk hosting]

Running PHP file automatically using Cron Jobs

What is Cron Job/CronTab?

A cron job is a process that is automatically run in the background of the system at whatever time you set it to run. This can be each day, each hour of every day, upto 1 minute of every hour of every day.

The cron daemon provides the ability for a system administrator to automate the routine running of scripts, tasks or any other server function on a regular basis. It is commonly used to automate system maintenance or administration. For example: to check if the server is down at certain times, to send newsletter at every weekends, to clean invalid data from database everyday etc.

Powered by WordPress