Closed alexey-sh closed 6 years ago
@alexey-sh Did you save your changes?
@dachev
require('crontab').load(function(err, crontab) {
crontab.create('ls -lh', '0 0/12 * * *', 'uuid');
crontab.save(function(err, crontab) {
console.log('saved')
});
});
in terminal I see only empty line:
$ node cron.js
saved
$ crontab -l
@alexey-sh The 0/12 token is non-standard and fails to parse. At the library level this is indicated by crontab.create returning a null. If you can point me to some official doc for a cron version that supports this syntax I am willing to add support.
I've created job successfully via command
cron.create(sysCommand, '0 0/12 * * *', uuid);
butcrontab -l
show me nothing