New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
issue with readme example #40
Comments
Hey sorry for the delay. Your Mongo is likely too old a version. You need |
hi thank you, with 2.4.9 it starts nicely, but the task is executed only once :o. I supposed it was a periodic task. D. |
Can you run the following in the mongo console and paste the output....
|
[ |
You forgot to call var Agenda = require('agenda');
var agenda = new Agenda({db: { address: 'localhost:27017/agenda-example'}});
agenda.define('a task', function(job, done) {
console.log("a task is running ... say hello");
done();
});
agenda.every('1 minutes', 'test');
agenda.start();
|
Ooops, thanx. Now it works well on Ubuntu13/mongo2.4.9. Unfortunately there is another issue on OSX10.9.2/mongo2.4.8. see paste http://pastebin.com/1CA9X9ZG Another insidious aspect of this issue is that the error is presented only at first launch, if you relaunch the code it silently runs without actually executing tasks. � |
@dadaista that error is basically what happens when you try and run a job that isn't defined. |
@rschmukler yeah, but the same code works well in ubuntu :o |
@dadaista that's likely because the job that is undefined does not exist in your ubuntu database, but does in your other. Can you give me the content of the agendaJobs database and the definition file so I can get a better idea of what's going on? |
Closing for lack of activity, please re-open whenever you can. |
Hi, i took the example in readme and wrote a tryAgenda.js very simple
Agenda = require('agenda');
var agenda = new Agenda({db: { address: 'localhost:27017/agenda-example'}});
agenda.define('a task', function(job, done) {
console.log("a task is running ... say hello");
});
agenda.every('1 minutes', 'a task');
agenda.start();
but at runtime it exits with error ...see trace http://pastebin.com/QC4JMK2t
any hints?
The text was updated successfully, but these errors were encountered: