Find the answer to your Linux question:
Results 1 to 5 of 5
HI all I've created cron file and it's entry is as below: 28 * * * * ls -lh > /tmp/aa.txt But it doesn't running in every 28th minute of ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2007
    Posts
    10

    [SOLVED] My Cron is not working


    HI all
    I've created cron file and it's entry is as below:

    28 * * * * ls -lh > /tmp/aa.txt

    But it doesn't running in every 28th minute of hour. What may be the reason?
    I've created it as below:
    [ejdaha@localhost]crontab -e
    Changed it .. then give a list
    [ejdaha@localhost]crontab -l
    See my cron there.
    But it doesn't work ..

    Thanks for suggestions

  2. #2
    Linux Engineer b2bwild's Avatar
    Join Date
    Jul 2008
    Location
    Behind You!
    Posts
    1,108
    try putting you command as
    /bin/ls
    Never make any misteaks.

    Read my Blog at --> Penguin Inside Subscribe Feed

  3. #3
    Just Joined!
    Join Date
    Jan 2007
    Posts
    10
    I changed it to full address, now its working. But my sh file is not working. My crontab's entry is :
    * * * * * /home/oracle/sh/test.sh

    What may be the reason?
    Thanks.

  4. #4
    Linux Engineer b2bwild's Avatar
    Join Date
    Jul 2008
    Location
    Behind You!
    Posts
    1,108
    have you given execute permission to your "test.sh"
    then try changing it to "/bin/sh /home/oracle/sh/test.sh"
    (it may not work) test it.
    to execute shell script from CLI it should be initiated with "./" or "sh"
    Never make any misteaks.

    Read my Blog at --> Penguin Inside Subscribe Feed

  5. #5
    Just Joined!
    Join Date
    Jan 2007
    Posts
    10
    Thank you very much
    I solved this problem by exportin all Oracle's Environment variables
    Thanks ...

Posting Permissions

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