节点 cron 作业正在运行
node cron job is working
我正在尝试 运行 节点 cron 作业的代码,但是当我指定具体时间时它不起作用。下面是代码。
var job = new cronJob({
cronTime: '00 01 16 * * 1-5',
onTick: function() {
console.log("hello");
},
start: true,
timeZone: 'America/Los_Angeles'
});
job.start();
it should print hello every workday at 04:16:00 pm. I want this behavior
尝试将您的代码更改为:
var job = new cronJob({
cronTime: '00 16 16 * * 1-5',
onTick: function() {
console.log("hello");
},
start: true
});
我正在尝试 运行 节点 cron 作业的代码,但是当我指定具体时间时它不起作用。下面是代码。
var job = new cronJob({
cronTime: '00 01 16 * * 1-5',
onTick: function() {
console.log("hello");
},
start: true,
timeZone: 'America/Los_Angeles'
});
job.start();
it should print hello every workday at 04:16:00 pm. I want this behavior
尝试将您的代码更改为:
var job = new cronJob({
cronTime: '00 16 16 * * 1-5',
onTick: function() {
console.log("hello");
},
start: true
});