|
| |||||||||
| Tags: command prompt, irix, linux, solaris, system |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| How to setup Cron Job via ssh
I am trying to setup a Cron Job via SSH by running a php script. Can any one tell me that how should i setup a Cron Job? I do know the command required, but i don't know how to set the actual job up? |
|
#2
| |||
| |||
| How to setup Cron Job via ssh
To setup a Cron Job you should perform the following steps:- 1) nano /etc/crontab 2) 01 * * * * root run-parts /etc/cron.hourly 3) wget -O - -q -t 1 /path/to/cron.php And if u want to make this run every two hours then you need to follow: Quote:
|
|
#3
| ||||
| ||||
| How to setup Cron Job via ssh
First of all you need to create cron.hourly right file, which is known as script.cron. The path at the end of your crontab is the file or script, that you want to run. A job every two hours might look like this: Quote:
Quote:
|
|
#4
| ||||
| ||||
| How to setup Cron Job via ssh
There are 2 ways through which you can setup a Cron Job: 1) To setup a Cron job, you should not need an extension (.cron) if it is text file the "crontab" command will automatically put it in the correct directory The following command: Quote:
bash$ crontab /path/to/crontab or bash$ crontab /path/to/crontab.txt etc... to check it run : bash$ crontab -l 2) Save your Crontab as a (plain) text file and name it "crontab" then,perform the following step: open an SSH session, For listing your current crontab Quote:
Quote:
Quote:
|
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "How to setup Cron Job via ssh" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Combining SSH and Cron | void | Software Development | 3 | 06-08-2010 02:44 AM |
| Problem in using cron command | Gunner 1 | Windows Software | 5 | 19-02-2010 01:25 AM |
| Cron jobs from a terminal | GlassFish | Windows Software | 3 | 11-12-2009 02:58 PM |
| Running PHP Scripts with Cron | klite | Software Development | 5 | 04-11-2009 08:26 AM |
| Cron no output !! | Jabeen | Software Development | 3 | 13-07-2009 10:05 AM |