0.2.2 • Published 9 years ago

sails-hook-schedule v0.2.2

Weekly downloads
47
License
-
Repository
github
Last release
9 years ago

sails-hook-schedule

Hook to manage basic cron job for sails application

Base on node-schedule module https://github.com/node-schedule/node-schedule

##Installation npm install sails-hook-schedule Don't use sudo or config/schedule.js will be create as root user

##Configure Create or modify config/schedule.js :

module.exports.schedule = {
  sailsInContext : true, //If sails is not as global and you want to have it in your task
  tasks : {
      //Every monday at 1am
      firstTask : {
         cron : "0 1 * * 1",
         task : function (context, sails)
         {
              console.log("cron ok");
         },
         context : {}
      }
  }
};

That's it :)

0.2.2

9 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago