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]

5. To open crontab in Edit mode

[root@xxx ~]# crontab –e

Press I to INSERT
Enter the cronjobs like

*   *  *   * *  lynx -source http://www.domain.co.uk/cron.php >/dev/null  2>&1
*   *  *   * *  lynx -source http://www.domain.co.uk/birthdaymailer.php >/dev/null  2>&1

Or you can write cron jobs path like this too

* * * * * /usr/bin/php /var/www/vhosts/domain.co.uk/httpdocs/process.php 2>&1 >/dev/null

Press ESC
Press Shift+;
Type : wq

6. To recheck crontab

[root@xxx ~]# crontab –l
Be Sociable, Share!
You can leave a response, or trackback from your own site.

2 Responses to “Setting Cron Jobs from SSH”

  1. Interesting post, thanks for your tips and insight.
    Srivathsan G.K recently posted..How much does Businesses Spend Money on Social Media

  2. [...] 3. Login with username and password. ? [...]

Leave a Reply

CommentLuv badge
 

Powered by WordPress