[Toolserver-l] Cronjob starting cronsub

Marcin Cieslak saper at saper.info
Mon Feb 28 15:04:49 UTC 2011


>> Magnus Manske <magnusmanske at googlemail.com> wrote:
> On Mon, Feb 28, 2011 at 2:28 PM, Marcin Cieslak <saper at saper.info> wrote:
>>>> Magnus Manske <magnusmanske at googlemail.com> wrote:

>>>> cronsub update_dupes /home/magnus/update_dupes.pl
>>> qsub: Unknown option
>>>
>>> qsub: Unknown option
>>>
>>> qsub: Unknown option
>>
>> This is because you have in your script
>>
>> #$cmd = "./cron_sql.sh" unless -e $cmd ;
>>
>> and this is recognized by qsub(1) as the embedded qsub option.
>>
>> If you change it to:
>>
>> # $cmd =
>>
>> it works again.
>
> Thanks!
>
> Wow, what a mess. Why does cronsub/qsub try to divine hidden vodoo
> meaning from my scripts (which predate qsub availability) anyway? If
> that is desired for some cases, why is that activated by default? Is
> there at least a qsub option to turn it off? Will that option work
> with cronsub?

To quote man qsub(1):

     -C prefix_string
          Available for qsub and qrsh with script submission  (-b
          n).

          Prefix_string defines the prefix that declares a direc-
          tive  in  the  job's  command.  The prefix is not a job
          attribute, but affects the behavior of qsub  and  qrsh.
          If  prefix  is  a  null string, the command will not be
          scanned for embedded directives.
          The directive prefix consists of two  ASCII  characters
          which,  when  appearing  in  the  first  two bytes of a
          script line, indicate that what follows is an Sun  Grid
          Engine command.  The default is "#$".
          The user should be aware that changing the first delim-
          iting character can produce unforeseen side effects. If
          the script file contains  anything  other  than  a  "#"
          character  in  the first byte position of the line, the
          shell processor for the job will reject  the  line  and
          may exit the job prematurely.
          If the -C option is present in the script file,  it  is
          ignored.

However, please be warned that cronsub currently messes up custom
qsub options.

//Marcin




More information about the Toolserver-l mailing list