DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: seting jobs to run in bourne and korn shell

Hybrid View

  1. #1
    Join Date
    Jan 2001
    Posts
    72

    Cool

    I have 2 jobs. I want to run the first one everday at 2:pm in the afternoon and the second one just this wednesday at 5.00 am.
    How do I run those jobs from the bourne and korn shell. Is the same process?

    Please do an example.

    The name of the first job is jobone.sh
    The second job is jobtwo.sh

  2. #2
    Join Date
    Feb 2000
    Location
    Washington DC
    Posts
    1,843
    It really doesn't matter what shell you use if you are uing crontab scheduler. All OS does is submit that job at specified time.

    Make an entry in crontab like this

    00 14 * * * jobone.sh
    00 05 21 03 03 jobtwo.sh
    Reddy,Sam

  3. #3
    Join Date
    Sep 2000
    Posts
    47
    Another way to execute a one time job is to use the "at" command:

    at -f jobtwo.sh -t 03210500


    Tim

  4. #4
    Join Date
    Jul 2000
    Location
    Oxford, OH
    Posts
    117
    Cron executes scripts under sh so if you want to run a Korn shell script you should put the line

    #!/usr/bin/ksh

    as the first line in your script. Make sure that you have the correct path to the ksh file, it may be somewhere other than /usr/bin
    _________________________
    Joe Ramsey
    Senior Database Administrator
    dbaDirect, Inc.
    (877)687-3227

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width