Skip to content
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

Example #19

Open
tspent opened this issue Nov 15, 2018 · 1 comment
Open

Example #19

tspent opened this issue Nov 15, 2018 · 1 comment

Comments

@tspent
Copy link

tspent commented Nov 15, 2018

How can i use Agenda in loopback boot script?

@mrbatista
Copy link
Owner

mrbatista commented Nov 15, 2018

@tspent Define a model QueueJob connected to agenda connetor and create a boot script with this code

module.exports = (app) => {
  const {QueuJob} = app.models;

  app.once('started', () => {
      QueuJob.every('30 minutes', (job) => {
       //job code
      });
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants