Results 1 to 4 of 4

Thread: ls and other commands behave different when executed from cron

  1. #1
    Join Date
    Jul 2009
    Posts
    42

    ls and other commands behave different when executed from cron

    I have noticed that ls and other commands behave different when executed from cron. If i have a bash script executed from cron, it behaves differently. also sometimes it generates errors for no apparent reason. What may be wrong? Can anyone help me with this?

  2. #2
    Join Date
    Jan 2009
    Posts
    202

    Re: ls and other commands behave different when executed from cron

    What errors are you getting? Does the errors indicate a missing file or dependency library file? this may be the issue, check if you have all the dependency satisfied, all the packages that it needs are installed propely... Then may be the problem could get solved...

  3. #3
    Join Date
    Jul 2009
    Posts
    42

    Re: ls and other commands behave different when executed from cron

    I have checked everything, no dependency error, no missing files and everything is up to date. also when i run the bash script in terminal it executes normally, the problem occurs only when i'm running it from cron. Any other ideas? Please help...

  4. #4
    Join Date
    May 2008
    Posts
    4,085

    Re: ls and other commands behave different when executed from cron

    Bash scripts behave differently when they are run from cron. This is because there it has no terminal connected to standard input and standard output [stdin/stdout]. Hope this helps...

Similar Threads

  1. Replies: 4
    Last Post: 29-12-2010, 06:49 AM
  2. How to setup Cron Job via ssh
    By Nalini_sh in forum Operating Systems
    Replies: 3
    Last Post: 12-11-2009, 10:16 AM
  3. Need Basic Dos commands for Commands prompt
    By JangoRap in forum Operating Systems
    Replies: 5
    Last Post: 29-06-2009, 12:07 PM
  4. How to Behave at An Interview
    By Educated in forum Education Career and Job Discussions
    Replies: 3
    Last Post: 21-03-2009, 05:04 PM
  5. Internet behave tricky...
    By Wannabe in forum Technology & Internet
    Replies: 3
    Last Post: 05-12-2008, 07:21 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,582,854.49443 seconds with 17 queries