I'm having one of those days. I have created some Grunt scripts to do some 
build work. I have created the first script to do a JSHint check on JS 
files in the repo, and then send an email with the errors. Works great - 
I'm using grunt with jshint, and that module has an escape to call a custom 
formatter for the JSHint errors, also written in javascript. I'm using 
Amazon SES to send the emails.

All works fine in practice, but it will not run in CRON. I can see the cron 
jobs starting in the CRON jobs. No errors. I can run the commands from the 
command line, no errors - works beautifully. I can run other cron jobs that 
dump data out to /tmp, no problem. But no output comes out of the Grunt job.

So I took the formatter out, and ran it as a plain node.js job. Works fine. 
But again, it does nothing as a CRON job. I have stripped out everything, 
except for the part where it sends an email, and I'm just sending hard 
coded text with a hard coded email address. Will run again from the command 
line, so permissions are fine, but when I try to run as CRON, nothing 
happens.

Any suggestions. I have been up and down the permissions check. I have 
change the files and the directory where they work over to allow anything. 
Still nothing. I created the crontab entry with crontab -e, so it is 
running in the same user, (ubuntu,) that owns the directories and files.

Running on Ubuntu 12.04. I'm stumped. Any ideas? I have set it up to run 
every minute.

Here's the crontab line:
*/1 * * * *  sh /var/test/trunk/build/batch_jshint.sh

The cron logs:
Jul 18 21:57:01 ip-10-251-25-8 CRON[2561]: (ubuntu) CMD (sh 
/var/test/trunk/build/batch_jshint.sh)
Jul 18 21:57:01 ip-10-251-25-8 CRON[2562]: (ubuntu) CMD (sh 
/var/test/trunk/build/test.sh)
Jul 18 21:57:01 ip-10-251-25-8 CRON[2563]: (ubuntu) CMD (/usr/bin/uptime > 
/tmp/uptime)
Jul 18 21:57:01 ip-10-251-25-8 CRON[2560]: (CRON) info (No MTA installed, 
discarding output)
Jul 18 21:58:01 ip-10-251-25-8 CRON[2581]: (ubuntu) CMD (sh 
/var/test/trunk/build/batch_jshint.sh)
Jul 18 21:58:01 ip-10-251-25-8 CRON[2582]: (ubuntu) CMD (sh 
/var/test/trunk/build/test.sh)
Jul 18 21:58:01 ip-10-251-25-8 CRON[2583]: (ubuntu) CMD (/usr/bin/uptime > 
/tmp/uptime)
Jul 18 21:58:01 ip-10-251-25-8 CRON[2580]: (CRON) info (No MTA installed, 
discarding output)

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to