[英]Meteor Email - Synced Cron - Exception in setTimeout callback: TypeError: Cannot call method 'getTime' of undefined`
Using the percolate:synced-cron package, I'm trying to schedule sending an email for a specific time in the future. 我正在使用percolate:synced-cron软件包,计划在将来的特定时间发送电子邮件。 I insert a future task into the db, but I get this error
Exception in setTimeout callback: TypeError: Cannot call method 'getTime' of undefined
我将将来的任务插入数据库,但
Exception in setTimeout callback: TypeError: Cannot call method 'getTime' of undefined
收到此错误Exception in setTimeout callback: TypeError: Cannot call method 'getTime' of undefined
db.future_tasks.find({}).pretty()
{
"_id" : "t35s5Daj7iwNeW9gm",
"to" : "niko.tzikas@gmail.com",
"from" : "niko.tzikas@gmail.com",
"subject" : "wassup",
"text" : ISODate("2015-07-22T19:25:32.781Z"),
"date" : ISODate("2015-07-22T19:25:32.781Z")
}
I20150722-15:22:50.339(-4) (synced-cron-server.js:52) SyncedCron: scheduled "EguDR6bFxKNECZAXF" next run @Wed Jul 22 2015 15:23:10 GMT-0400 (EDT)
I20150722-15:23:10.266(-4) (synced-cron-server.js:52) SyncedCron: Starting "EguDR6bFxKNECZAXF".
I20150722-15:23:10.269(-4) (synced-cron-server.js:52) SyncedCron: Removed "EguDR6bFxKNECZAXF
I20150722-15:23:10.271(-4) (synced-cron-server.js:52) SyncedCron: Finished "EguDR6bFxKNECZAXF".
I20150722-15:23:10.279(-4)? Exception in setTimeout callback: TypeError: Cannot call method 'getTime' of undefined
I20150722-15:23:10.279(-4)? at scheduleTimeout (packages/percolatestudio:synced-cron/synced-cron-server.js:238:1)
I20150722-15:23:10.280(-4)? at Object.SyncedCron._laterSetTimeout (packages/percolatestudio:synced-cron/synced-cron-server.js:228:1)
I20150722-15:23:10.280(-4)? at scheduleTimeout (packages/percolatestudio:synced-cron/synced-cron-server.js:206:1)
I20150722-15:23:10.280(-4)? at packages/percolatestudio:synced-cron/synced-cron-server.js:248:1
I20150722-15:23:10.280(-4)? at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20150722-15:23:10.281(-4)? at packages/meteor/timers.js:6:1
I20150722-15:23:10.281(-4)? at runWithEnvironment (packages/meteor/dynamics_nodejs.js:108:1)
I tried making the date a string, but it makes no difference. 我尝试将日期设置为字符串,但这没有区别。 If I try actually emailing the task (which works without SyncedChron) like:
如果我尝试通过电子邮件实际发送任务(在没有SyncedChron的情况下有效),例如:
Email.send({
from: details.from,
to: details.to,
subject:new Date(),
text: details.date
//date: details.date
});
I get: 我得到:
TypeError: Object Wed Jul 22 2015 15:24:46 GMT-0400 (EDT) has no method 'replace'
http://richsilv.github.io/meteor/scheduling-events-in-the-future-with-meteor/ http://richsilv.github.io/meteor/scheduling-events-in-the-future-with-meteor/
https://github.com/percolatestudio/meteor-synced-cron https://github.com/percolatestudio/meteor-synced-cron
It is a bug in the package . 这是程序包中的错误 。 A fix is listed on that link and apparently included in this package .
该链接上列出了一个修复程序,该修复程序显然包含在此软件包中 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.