reading from crontab db and populating UI

This commit is contained in:
Suresh Alse
2015-06-12 14:41:53 +05:30
parent e5b466aa50
commit 035d432b7a
6 changed files with 197 additions and 27 deletions

4
app.js
View File

@@ -18,11 +18,13 @@ app.set('port', (process.env.PORT || 8000));
app.get(routes.root, function(req, res) {
// get all the crontabs
//crontab.create_new("/usr/bin/find", "0 2 12 * *");
//crontab.create_new("/sbin/ping -c 1 192.168.0.1 > /dev/null", "* * * * *");
crontab.crontabs( function(docs){
console.log(docs);
res.render('index', {
routes : routes,
crontabs : docs
crontabs : JSON.stringify(docs)
});
});
})