paleo cron
This commit is contained in:
parent
d34714e2e3
commit
5a1cdc5fac
@ -8,6 +8,11 @@
|
||||
<set />
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="$PROJECT_DIR$/cron.js">
|
||||
<value>
|
||||
<set />
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="$PROJECT_DIR$/jobs-local.html">
|
||||
<value>
|
||||
<set />
|
||||
|
@ -54,18 +54,18 @@
|
||||
<file leaf-file-name="paleo.js" pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/paleo.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.8896552">
|
||||
<caret line="76" column="25" selection-start-line="76" selection-start-column="25" selection-end-line="76" selection-end-column="25" />
|
||||
<state vertical-scroll-proportion="0.50344825">
|
||||
<caret line="98" column="26" selection-start-line="98" selection-start-column="26" selection-end-line="98" selection-end-column="26" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="paleo2.xml" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/paleo2.xml">
|
||||
<file leaf-file-name="cron.js" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/cron.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="11" selection-end-column="12" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
@ -146,6 +146,7 @@
|
||||
<option value="$PROJECT_DIR$/plugins/capitalize_title.js" />
|
||||
<option value="$PROJECT_DIR$/plugins/filter_glasgow.js" />
|
||||
<option value="$PROJECT_DIR$/jobs-local.xml" />
|
||||
<option value="$PROJECT_DIR$/cron.js" />
|
||||
<option value="$PROJECT_DIR$/paleo.js" />
|
||||
</list>
|
||||
</option>
|
||||
@ -1115,7 +1116,7 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/paleo.xml">
|
||||
<entry file="file://$PROJECT_DIR$/paleo2.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
@ -1123,7 +1124,15 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/paleo2.xml">
|
||||
<entry file="file://$PROJECT_DIR$/cron.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="11" selection-end-column="12" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/paleo.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.0">
|
||||
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
@ -1133,8 +1142,8 @@
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/paleo.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.8896552">
|
||||
<caret line="76" column="25" selection-start-line="76" selection-start-column="25" selection-end-line="76" selection-end-column="25" />
|
||||
<state vertical-scroll-proportion="0.50344825">
|
||||
<caret line="98" column="26" selection-start-line="98" selection-start-column="26" selection-end-line="98" selection-end-column="26" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
|
12
cron.js
Normal file
12
cron.js
Normal file
@ -0,0 +1,12 @@
|
||||
var CronJob = require('cron').CronJob;
|
||||
var job = new CronJob({
|
||||
cronTime: '0 0/60 * 1/1 * ? *',
|
||||
onTick: function() {
|
||||
// Runs every weekday (Monday through Friday)
|
||||
// at 11:30:00 AM. It does not run on Saturday
|
||||
// or Sunday.
|
||||
},
|
||||
start: false,
|
||||
timeZone: "America/Los_Angeles"
|
||||
});
|
||||
job.start();
|
21
paleo.js
21
paleo.js
@ -1,7 +1,7 @@
|
||||
var RssBraider = require('rss-braider'), fs = require('fs'),
|
||||
var RssBraider = require('rss-braider'), fs = require('fs'), CronJob = require('cron').CronJob,
|
||||
feeds = {};
|
||||
|
||||
// Pull feeds from config files:
|
||||
// Pull feeds from config files: ,
|
||||
// feeds.simple_test_feed = require("./config/feed").feed;
|
||||
// Or define in-line
|
||||
feeds.simple_test_feed = {
|
||||
@ -82,3 +82,20 @@ rss_braider.processFeed('simple_test_feed', 'rss', function(err, data){
|
||||
console.log("The file was saved!");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
var job = new CronJob({
|
||||
//cronTime: '0 0/60 * 1/1 * ? *',
|
||||
|
||||
cronTime: '0 0/5 * 1/1 * ? *',
|
||||
onTick: function() {
|
||||
// Runs every hour
|
||||
|
||||
console.log('Tick');
|
||||
|
||||
|
||||
},
|
||||
start: false,
|
||||
timeZone: "America/Los_Angeles"
|
||||
});
|
||||
job.start();
|
Loading…
Reference in New Issue
Block a user