February 2017
Beginner to intermediate
962 pages
21h 26m
English
Here is the final jobs.js file we will use. Copy this block of code and overwrite the current jobs.js file. We will break this down into functions later and try to explain what the coding does, without putting too much emphasis on the Node.js code itself.
WARNING
When copying from PDF and other files, the encoding may be different, such that it breaks the apostrophes and quotation marks. If you encounter this, just search and replace all apostrophes (') and quotation marks (").
var CronJob = require('cron').CronJob var splunkjs = require('splunk-sdk') var fs = require('fs') new CronJob('*/30 * * * * *', function() { // fetch the saved searchName fetchSavedSearch(renderResults, 'sdk_status_codes') }, function() ...Read now
Unlock full access