Page no: F21
Table of contents
- 1 Cron Schedule
- 2 Information about when the feeds comes in SNBCHF.com
- 3 Cron Jobs on the Server
- 4 Q. How do I set up a cron job to check my feeds for updates?
||Regular Cron||Feed WP
|Meta data||Posts to
|Comments||Usual Duration||Night Cron||US Time and Readers||How to investigate||Reasoning|
|Snbchf||Cron every 1 h||Cron every 1 h||Cron every 1 h||Cron every 1 h||(15 min before starting with videos)||—-||Crons server logs||We doubled the load|
|Austrian||1:05, 4:05||1:59, 4:59||10:05||23:00||7:05||2h||3:05, 4:05, 5:05||21.05 NY … OK|
|Central bank||1:05, 4:05||1:59, 4:59||10:10||–||7:10||30min||3:15, 4:15, 5:15|
|Leaders||2:05, 5:05||2:59, 5:59||10:15||–||7:15||each 1 hour max||3:25, 4:25, 5:25|
|European||2:05, 5:05||2:59, 5:59||10:15||–||7:15||each 1 hour max||3:45, 4:45, 5:45|
|Heterodox||2:05, 5:05||2:59, 5:59||10:20||–||7:20||each 1 hour max||00:05, 1:05, 2:05|
|Macro||3:05, 6:05||3:59, 6:59||10:30||–||7:30||each 1 hour max||1:15, 2:15|
|Swiss.economicblogs.org||3:05, 6:05||3:59, 6:59||10:35||–||7:35||—|
|Syndication||00:50, 1:50, 2:50|
|Crypto||1:05, 4:05||1:59, 4:59||10:40||–||7:05||3:55, 4:55, 5:55|
|U.S. Ends (New York) 8pm||03:00|
Here is some background content and how we do it.
Information about when the feeds comes in SNBCHF.com
|Swiss Statistics||In the morning|
|Investec||Different time every day|
|Acting Man||between 9 and 14 h|
|Zerohedge||between 21 and 03|
|Dukascopy video movers and shakers||19 o’clock Bulgarian time|
Cron Jobs on the Server
Q. How do I set up a cron job to check my feeds for updates?
A: First, let’s talk about what you need to put in your crontab file. If you don’t know what a crontab is, or don’t know how to edit yours, I’ll talk about that below. If you do know what a crontab is, and know how to edit or add jobs to yours, the main thing you need to know is that you can perform scheduled updates by sending regularly-scheduled HTTP requests to your blog’s URL with a GET parameter set to
update_feedwordpress=1. So, for example, if your blog is at
http://example.com/, then inserting the following line in your crontab:
*/10 * * * * /usr/bin/curl --silent http://example.com/?update_feedwordpress=1
will check in every 10 minutes and check for updates on any feeds that have been marked as ready for polling. (Note that this does not mean that all your feeds, or any of your feeds, will be polled for updates once every 10 minutes. What happens once every 10 minutes is that FeedWordPress will check whether any feeds are ready for polling, and if so poll them. Feeds typically get marked as being ready to check again about 60 minutes after the last time that they were checked for updates.)
How to edit your crontab
A crontab is a plain text file used by the Linux/Unix cron service to run commands according to a fixed schedule. (Since cron is designed for tasks that need to be executed repeatedly at a certain time or date, it is typically used to schedule regular maintenance tasks. In this case, we want to use it to schedule the task of telling FeedWordPress to check for feeds that need to be polled for updates.)
Every crontab contains a series of lines, with each line representing a cron job — which means a schedule (expressed as a series of numbers), and a command line to execute according to that schedule. The line you see above tells your web server to execute the command
/usr/bin/curlwith the arguments
--silent http://example.com/?update_feedwordpress=1once every 10 minutes.
The best way to edit your crontab depends on the resources that your web host provides. If your web host provides shell access, you can log into your shell account using ssh and just issue the following command at the command prompt:
$ crontab -e
If your host does not provide shell access, then your host is a bad web host. But oh well; sometimes you have to deal with bad web hosts. Some web hosts try to make up for not offering shell access by providing administrative interfaces on the web, such as cPanel or custom web-basedControl Panels. If your web host offers cPanel, you can use this tutorial on creating cron jobs in cPanel. If you’re using DreamHost, they have a Wiki page with a lot of information on setting up cron jobs from their administrative tools. If you’re unsure, the best thing for you to do is to contact your web hosting company’s technical support, and ask them how to set up a cron job to run maintenance tasks for your website.
Adding Cron Jobs in Vesta
Each user must log in to Vesta and configure the Cron jobs.
The setup process is very important. We need to setup the cron right. We are setuping two absolutely the same crons with 1 hour delay between them. This is made because if the first cron freeze or get timeout, the second cron will add the missing information (but it will not duplicate the old!). So we need to setup two crons every night during the night with 1 hour delay between them.
The crons can be hourly, daily, weekly, monthly etc. If we want to setup a daily cron. We need to put * (this is the symbol for every) to the fields, which will be executed every time. So in our example we add * to day, weekday, month. After that we setup in which time we will execute the cron. After that we setup another with one 1 delay.
The command field is the field of the command, which the cronjob has to be execute. In our case we are copy her from FeedWordpress (Syndication). We can see where it is located on the screenshot above.
Reminder Mails inside Cron Details
Each time a Cron job is executed, Vesta send an email to an email address.
|The load of blog content happens during the night with a CRON job.
This page describes how it is done.
Cron Jobs without Apache, direct PHP Call
Backup problem was caused by High load on the server. It was above 30. I restarted all the services and then turn the backup on and monitoring it. It works fine.
The solution was to move the crons to be executed directly via php. We rewrote the cronjob and called the php directly.
Now it works fine.
Screen that shows the Cron Jobs executed via Apache
What does FeedWP PHP?
Trigger: Cron with the parameters to the right.
Then the PHP job for FeedWP looks inside his config, which feeds have to be loaded.
Tags: CRONSee more for