On Wed, 6 Feb 2013 05:39:55 -0800 (PST)
Jesús Lucas Flores <[email protected]> wrote:

> Hey guys,
> 
> I need a little bit help with a custom manage.py command called *test*
> 
> 
>  I am using it in a virtualenv on a shell script  *script.sh*,
> 
> The script.sh works well out of the cron and Wihiout activate the 
> virtualenv also works well.
> 
> but if the script is on the crontab give a *Unknown command: 'test'* .
> 
>  Here is the code:  http://dpaste.org/hjaVi/ , 
> 
> Any help ? 
> 
> Thank you
> 

Are you sure the script functions even without activating the virtual
environment?

Have you perhaps set some environment variables in your regular account
that are not available during the cron execution?

Keep in mind that cron executes jobs with bare minimum of environment
variables set. You could check the environment variables set by cron by
adding a line to your script that goes something like:

/usr/bin/printenv > /tmp/cronjob_envvars

You could then compare output from that file to the output of the
printenv command that you run by hand.

Best regards

-- 
Branko Majic
Jabber: [email protected]
Please use only Free formats when sending attachments to me.

Бранко Мајић
Џабер: [email protected]
Молим вас да додатке шаљете искључиво у слободним форматима.

Attachment: signature.asc
Description: PGP signature

Reply via email to