Skip to content

Commit

Permalink
minimal support for outputting tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel Alabor committed May 13, 2014
1 parent de84d1e commit ef3faf2
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,18 @@ var parser = require('./parser')
* Outputs a list of all scheduled tasks to the `console`.
*/
function executeList() {
console.log('list');
var schedule = new Schedule();

schedule.load()
.then(function() {
console.log('Scheduled tasks:');
schedule.tasks.forEach(function(task) {
console.log(task);
});
})
.fail(function(err) {
console.log('Could not list tasks (' + err + ')');
});
}

/** Function: executeSchedule
Expand Down

0 comments on commit ef3faf2

Please sign in to comment.