admin管理员组文章数量:1026989
I have such script
setTimeout(function()
{
console.log("Timeout");
}, 1000 * 60);
When I run it and change system time back for one hour, the timeout not fires. If I change time forward for one hour, timeout works correctly.
Time is changed by external program which makes call like ioctl( rtcFd, RTC_SET_TIME, &newTime);
How to fix this problem?
We use Node.js v0.10.15 on OpenWRT Attitude Adjustment
Thank you
I have such script
setTimeout(function()
{
console.log("Timeout");
}, 1000 * 60);
When I run it and change system time back for one hour, the timeout not fires. If I change time forward for one hour, timeout works correctly.
Time is changed by external program which makes call like ioctl( rtcFd, RTC_SET_TIME, &newTime);
How to fix this problem?
We use Node.js v0.10.15 on OpenWRT Attitude Adjustment
Thank you
Share Improve this question asked Apr 15, 2016 at 8:04 Ruslan AbelkharisovRuslan Abelkharisov 3962 silver badges15 bronze badges 02 Answers
Reset to default 7I just founded that this is a bug fixed in newer version. It fixed by this mit in v0.10.33.
If you meet this problem, you need to update or patch your node.js
Use node scheduler this is for time-based scheduling
npm install node-schedule
var jobId="123456abc";
schedule.scheduleJob(jobId, new Date(1), function()
{
schedule.cancelJob(jobId);
// your code here.
});
I have such script
setTimeout(function()
{
console.log("Timeout");
}, 1000 * 60);
When I run it and change system time back for one hour, the timeout not fires. If I change time forward for one hour, timeout works correctly.
Time is changed by external program which makes call like ioctl( rtcFd, RTC_SET_TIME, &newTime);
How to fix this problem?
We use Node.js v0.10.15 on OpenWRT Attitude Adjustment
Thank you
I have such script
setTimeout(function()
{
console.log("Timeout");
}, 1000 * 60);
When I run it and change system time back for one hour, the timeout not fires. If I change time forward for one hour, timeout works correctly.
Time is changed by external program which makes call like ioctl( rtcFd, RTC_SET_TIME, &newTime);
How to fix this problem?
We use Node.js v0.10.15 on OpenWRT Attitude Adjustment
Thank you
Share Improve this question asked Apr 15, 2016 at 8:04 Ruslan AbelkharisovRuslan Abelkharisov 3962 silver badges15 bronze badges 02 Answers
Reset to default 7I just founded that this is a bug fixed in newer version. It fixed by this mit in v0.10.33.
If you meet this problem, you need to update or patch your node.js
Use node scheduler this is for time-based scheduling
npm install node-schedule
var jobId="123456abc";
schedule.scheduleJob(jobId, new Date(1), function()
{
schedule.cancelJob(jobId);
// your code here.
});
本文标签: javascriptNodejs setTimeout not fired after system time changeStack Overflow
版权声明:本文标题:javascript - Node.js setTimeout not fired after system time change - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745595500a2158143.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论