【发布时间】:2016-02-23 15:53:08
【问题描述】:
我正在尝试编写 Cron 作业。我必须在其中使用各种 Parse 方法。我手里有以下代码:
var crontab = require('node-crontab');
var jobId = crontab.scheduleJob("* * * * * *", function(){
console.log("Hello there! It's me again.");
Parse.Cloud.useMasterKey();
});
但是,当我运行时
节点文件名.js
来自终端的命令,它给了我一个错误:
Parse.Cloud.useMasterKey();
^
ReferenceError: Parse is not defined
另外,如果我尝试使用安装任何模块
npm install *****
那么,它也不适合我。
我想知道遗漏了什么。
提前致谢。
【问题讨论】:
-
你在使用 npm 时遇到了什么错误?
标签: javascript node.js parse-platform cron