![]() |
|
#1
|
||||
|
||||
|
I want to set up a Cron Job for a Wordpress site using the Postie plugin. The plugin requires this code to be ran:
*/5 * * * * /usr/bin/lynx --source http://www.economysizegeek.com/wp-co...e/get_mail.php >/dev/null 2>&1 I really don't know what to do with it. I found the Cron Jobs section in the Cpanel but I'm just confused. I've never done this before. I would like to run this about once an hour or two. |
|
#2
|
|||
|
|||
|
Quick cron tutorial:
The first numbers/wildcards refer to the following: 1 - minute 2 - hour 3 - day (of month) 4 - month 5 - day (of week) That means that: */5 * * * * will run every 5 minutes on every hour of every day of the month on every month on every day of the week. To change this to run hourly, you can do something like this: 0 * * * * This will run every 0th minute (i.e. o'clocks, 1:00, 2:00, ...) of every hour on every day.... or something like this: 5 * * * * will run at 1:05, 2:05, .... Next is the command: Quote:
0 = stdin - used for input 1 = stdout - used for output 2 = stderr - used for errors The "greater than" symbol redirects output from one of these file descriptors. This command is telling lynx to download the aforementioned page, then redirect its output to the following: Quote:
Quote:
Search for the lynx and wget manuals to understand how those commands work. When you click on "cron jobs" in cpanel, click on "go advanced" to insert the data there. Alternatively, feel free to use the simpler interface if you're not comfortable using the above directions. Good luck! Last edited by squinky86; 01-20-2009 at 06:07 PM. Reason: stupid automatic links.... |
|
#3
|
||||
|
||||
|
Thanks for your handy tutorial! I tried it out in Cpanel but now how do I know if it works? I don't see an option that shows the Cron job that I just submitted. Is there a way to find it?
|
|
#4
|
|||
|
|||
|
If it's not showing up after adding it, you need to submit a support ticket. After you click on "standard" or "advanced," you should see your new cron job as one of the entries.
|
|
#5
|
||||
|
||||
|
Thanks again, I must have done it wrong the first time but the second time it showed up. I think I'm all set now.
|
![]() |
| Tags |
| cron job, postie, wordpress |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|