Find the answer to your Linux question:
Results 1 to 2 of 2
Dear all, i am newbie in Linux. I face a problem to run a crontab. i put 10 10 * * * /kablad/bin/kablad.sh then my kablad.sh file is sqlplus /nolog ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2008
    Posts
    1

    crontab


    Dear all,
    i am newbie in Linux. I face a problem to run a crontab.

    i put

    10 10 * * * /kablad/bin/kablad.sh

    then my kablad.sh file is

    sqlplus /nolog << EOF
    CONNECT scott/tiger@kablad
    spool /robdata/logs/truncate.log
    TRUNCATE TABLE scott DROP STORAGE ;
    COMMIT;
    spool off
    exit;
    EOF

    Red Hat Enterprise Linux ES release 3 (Taroon Update 5)
    Kernel 2.4.21-32.EL on an i686

    when time after 10.10am...it no truncate my scott table.
    So,anyone can help me in this kind of problem...?or give me some idea to solve it...?

    Thanks....

  2. #2
    Linux Enthusiast Opnosforatou's Avatar
    Join Date
    Dec 2003
    Location
    Vleuten, The Netherlands
    Posts
    552
    It's not a problem with crontab, more a problem with the script.

    What happens if you execute the script from the command line ?
    Same thing happening ?

    Has the user who has this script in it's crontab access to the server ?

    From the looks of it your trying to get a connection to an SQL server and run some SQL statements.
    ---[ MS09-99896 - Vulnerability in All MS Windows OS ; Using Windows Could Allow Remote Code Execution. ]---
    Hardware: Asus P4P800, 1GB, P4-3Ghz, Asus V9950, Maxtor ATA HD\'s, 3Com GBit lan, Audigy ZS Plat.

Posting Permissions

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