Closed Arkkimaagi closed 10 years ago
Please don't post support requests in the bug tracker.
var crontab = require('crontab');
crontab.load(function(err, cron) {
var job = cron.create('/usr/local/bin/tdtool -v 250 -d 1 >/dev/null 2>&1');
job.minute().on(0);
job.hour().on(7);
job.dow().on(1,2,3,4,5);
cron.save(function() {
});
})
I want to know how to build a cron job that repeats every weekday:
That code turns the lights on at 7 am every weekday. I'd like to be able to adjust the time with node.js occasionally.
I do not quite understand how I could add such a job trough this library. There seems to be no place where I can write the cron timing parameters for this setup. Am I missing something?