How to Carton exec with crontab ?

132 views
Skip to first unread message

moulees...@jothisoftware.com

unread,
Apr 18, 2016, 1:54:56 AM4/18/16
to Mojolicious
Basically the commands in the CRONTAB will be executed from the root folder.
In-order to execute something with CARTON we are suppose to be in the directory where cpanfile resides.

I have tried CD (change directory) to the cpanfile directory and run the script.sh manually- it is working fine.
but, when i schedule the same script.sh in CRONTAB it is throwing error 'carton: command not found'

here is my script.sh
 --------------------------------
#!/bin/bash
cd Desktop/projectFolder/
carton exec perl script/run.pl
----------------------------------

And my cpanfile is in the directory 'projectFolder'

Thanks in advance. 

Luc Didry

unread,
Apr 18, 2016, 2:09:57 AM4/18/16
to mojol...@googlegroups.com, moulees...@jothisoftware.com
Use the absolute path of carton, `/usr/local/bin/carton` or whatever
`which carton` gives you.
--
Luc
http://www.fiat-tux.fr/
Internet n'est pas compliqué, Internet est ce que vous en faites.

Reply all
Reply to author
Forward
0 new messages