Source

iron-scheduler / README.md

Diff from to

README.md

 ```
 var Scheduler = require('iron-scheduler');
 var scheduler = Scheduler(ironOauthToken, ironProjectId, winstonLogger);
-scheduler.run(scheduledTasks);
+scheduler.run(scheduledTasks, function(err) {
+    if (err) { 
+        //handle error
+    } else {
+        //scheduler completed successfully. 
+    }
+});
 ```
 The logger is a [winston](https://github.com/flatiron/winston) logger, and is optional. If omitted you'll get console and file logging through a winston console logger; see the config.js file for details.
 The scheduledTasks parameter is an array of tasks in the same format as in the example payload above.