[Toolserver-l] cronsub

Dr. Trigon dr.trigon at surfeu.ch
Sat Jan 8 14:19:55 UTC 2011

Hello all
Hello River

1st Thanks for the fast reply. After reading it and also some older
posts I was able to figure out a 'chmod 744' is needed on my python
script BUT ALSO THE ADDITION OF '#!/usr/bin/env python' AS FIRST LINE
in the script IS NEEDED.

2nd I switched to 'cronie' (thanks for the installation ;)

3rd My next problem is:


Traceback (most recent call last):
  File "/sge62/default/spool/wolfsbane/job_scripts/118077", line 43, in
    import wikipedia, config, query, pagegenerators
ImportError: No module named wikipedia

when running:

'qsub $HOME/pywikipedia/runbotrun.py -cron'

which is the equivalent to:

'0 2 * * * cronsub -s mainbot $HOME/pywikipedia/runbotrun.py -cron'

in my cron(ie)tab file. But it seams that the change you mentioned
"Previously, SGE would copy the job script to a shared directory"
does not trigger for 'qsub'... I assume the both tools to have the
same behaviour, since I thought I can use 'qsub' to test my crontab
entries... But may be I'm wrong here.

Greetings! And thanks for your help!

Am 08.01.2011 03:28, schrieb River Tarnell:
> Hi,
> I've made a couple of changes to cronsub in response to some issues reported by 
> users.  Specifically:
> * cronsub now requires that the script file be executable, and will raise an 
>   error if it's not.  The previous behaviour was that non-executable scripts 
>   would be executed by /bin/sh.  If this affects you, the fix is to make the 
>   script executable (chmod +x).
> * Previously, SGE would copy the job script to a shared directory and execute 
>   it there.  For example, if you submitted $HOME/test.py, it would be copied 
>   to a file such as /sge62/default/spool/wolfsbane/job_scripts/117333 before 
>   starting.  This was unfortunate for Python users who depended on Python's 
>   behaviour of treating the script's directory as part of the "import" search 
>   path.
>   This behaviour has been changed, so that the script file will be executed in 
>   its original location.
> I appreciate that the first item may be a breaking change for some users.  
> However, on balance this seems like the lesser evil.
> 	- river.

Toolserver-l mailing list (Toolserver-l at lists.wikimedia.org)
Posting guidelines for this list:

More information about the Toolserver-l mailing list