rgtagenda

Testing RunGruntTask for agenda cron jobs

Usage no npm install needed!

<script type="module">
  import rgtagenda from 'https://cdn.skypack.dev/rgtagenda';
</script>

README

RunGruntTask-agenda

Using agenda to execute a grunt task programmatically

Dependency Status devDependency Status

NPM

Why this exists?

  • Grunt is a powerful tool for build/unbuild/configuring your application (Express.js etc).
  • Schedule a cron job to backup database using a grunt task every 24 hours etc. For this example, i have used a simple code validation grunt plugin to demonstrate but this can be used for any grunt task.

Installation

  • You would need to install mongoDB on your local system. Recommended using robomongo/compass for viewing collections.
  • npm install rgtagenda --save
  • npm i -g nodemon
  • cd node_modules/rgtagenda && npm i && nodemon app.js
  • Goto localhost:5000

Output

  • You should see a database "TestDB" in your database visualization tool such as robomongo/compass. You can change this in ./database.js

  • This code looks for Gruntfile.js by default. It would not work without it.

  • All agenda related config is in ./config.js

  • Should work on OSX/linux/Windows. If any issues, please report it here issues

  • [More about RunGruntTask] (https://github.com/serganus/RunGruntTask)