简体   繁体   English

流星电子邮件-同步Cron-setTimeout回调中的异常:TypeError:无法调用未定义的方法'getTime'

[英]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.

相关问题 Meteor ReactiveVar - TypeError:无法调用未定义的方法'set' - Meteor ReactiveVar - TypeError: Cannot call method 'set' of undefined 未捕获的TypeError:无法在流星JS中调用未定义的方法'appendChild' - Uncaught TypeError: Cannot call method 'appendChild' of undefined in Meteor JS Meteor.js错误:子xGHk6PkFTQ9uv8ncg类型错误:无法调用未定义的方法“查找” - Meteor.js error: Exception from sub xGHk6PkFTQ9uv8ncg TypeError: Cannot call method 'find' of undefined 客户端中针对未返回的Meteor方法调用的回调 - Callback in client for Meteor method call returning undefined TypeError:无法调用未定义的方法“ $ on” - TypeError: Cannot call method '$on' of undefined TypeError:无法读取未定义的属性“ getTime” - TypeError: Cannot read property 'getTime' of undefined 流星和CoffeeScript:无法调用未定义的方法“帮助器” - Meteor and CoffeeScript: Cannot call method 'helpers' of undefined node.js中的回调函数。 TypeError:无法调用未定义的方法“ emit” - Callback function in node.js. TypeError: Cannot call method 'emit' of undefined 未捕获的TypeError:无法调用未定义的方法'Pa' - Uncaught TypeError: Cannot call method 'Pa' of undefined TypeError:无法调用未定义的方法“ forEach” - TypeError: cannot call method 'forEach' of undefined
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM