We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
I have two files in which one is used as a client and other is for saving jobs in db which is listed below:
Agenda Client side code which is used for creating/saving jobs into mongodb:
var Agenda = require('agenda'); var agenda = new Agenda({db: {address: 'localhost:27017/cronjobs'}}); agenda.purge(function () { console.log("pr"); }); var job = agenda.create('delete old users', {'test': 'test'}); job.repeatEvery('10 seconds'); job.save();
Agenda running on serverside with agenda-ui:
var express = require('express'); var Agenda = require('agenda'); var agendaUI = require('agenda-ui'); var app = express(); var agenda = new Agenda({db: {address: 'localhost:27017/cronjobs'}}); console.log('here inside interval'); app.use('/agenda-ui', agendaUI(agenda, {poll: 1000})); agenda.jobs({}, function(err, jobs) { console.log(jobs); }); agenda.start(); app.listen(3022);
Actually I want to start agenda as independent from creating or defining job where its connecting with db and run the jobs stored inside mongodb.
But after running above piece of code I am not able to run jobs as repeated mode or as scheduler.
Please help.
Thanks, Vijay
The text was updated successfully, but these errors were encountered:
No where in the above code do I see that you have defined a task definition for 'delete old users'
Sorry, something went wrong.
Since this has had no reply in over a year I'm closing it. If this is still an issue please let us know so it can be reopened.
No branches or pull requests
Hi,
I have two files in which one is used as a client and other is for saving jobs in db which is listed below:
Agenda Client side code which is used for creating/saving jobs into mongodb:
Agenda running on serverside with agenda-ui:
Actually I want to start agenda as independent from creating or defining job where its connecting with db and run the jobs stored inside mongodb.
But after running above piece of code I am not able to run jobs as repeated mode or as scheduler.
Please help.
Thanks,
Vijay
The text was updated successfully, but these errors were encountered: