N
N
nop2013-06-25 13:14:33
JavaScript
nop, 2013-06-25 13:14:33

Running grunt with crontab

Made automation of product updates on the site using grunt.
You can't run grunt if you're in a different directory.

Tell me what command to use.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Konstantin Kitmanov, 2013-06-25
@nop

Run from the cron not grunt directly, but a small shell script like:

cd /to/project/path
grunt update-goods

As an option, pull the script from the cron not on the shell, but on JS:
#!/usr/bin/node

var grunt = require('grunt');

// perform grunt tasks programatically

N
Nop, 2013-06-25
@Nop

-

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question