Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Conversion corrections

...

 

Some shellscripts must run in a specific working directory. To achive this, you can add a cd command to the working directory before executing the shell script.

The default working folder ($SCHEDULER_DATA) is the one containing the 'config', 'jobs', etc. folders, so on a Win-7 installation with default settings, this is:

No Format

  C:\ProgramData\sos-berlin.com\jobscheduler\scheduler-id\

where 'scheduler-id' is the ID of the JobScheduler.

No Format

 <job  taskh1. task="5" stop_on_error="no" ordeh1. order="yes" warn_if_longer_than="30:00" namh1. name="job1">
    <script  language="shell">
        <\![CDATA[
 cd c:\temp
 c:\script\myscript.cmd
         ]]>
    </script>
 </job>

It is also possible to configure this as an extra file with just the cd command and add this file to the script with an include. This is helpfull when you attempt to move a job from test to production without changing the configuration but with another working directory on the production site.

No Format

 <job  taskh1. tasks="5" stop_on_error="no" ordeh1. order="yes" warn_if_longer_than="30:00" namh1. name="job1">
    <script  language="shell">
        <include  live_file="set_working_direcory.cmd"/>
        <\![CDATA[
c:\script\myscript.cmd
       ]]>
    </script>
 </job>

see also: