in reply to Re: running shell script in cron
in thread running shell script in cron

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^3: running shell script in cron
by cdarke (Prior) on Mar 24, 2009 at 09:59 UTC
    does it have anyting to do with profiles

    Could be. Decide which profile file(s) you need to execute (.bash_profile, .profile, .bashrc) and use 'source' to read them in at the start of the script.
      From the name of the script, I would infer Korn shell is being used - hence the OP should use the dot command ('.') - source is, mercifully, not a Korn shell keyword.

      A user level that continues to overstate my experience :-))
      i would need the .profile file, but when i add that in the start of the script as . /home/.profile, it gives me an error saying that the . in line 2 is unexpected or something like that.
        saying that the . in line 2 is unexpected or something

        Then why don't you fix line 2????

        -- 
        Ronald Fischer <ynnor@mm.st>
Re^3: running shell script in cron
by rovf (Priest) on Mar 26, 2009 at 09:17 UTC

    You are aware that jobs running on cron usually have a very restricted environment - for instance, the PATH might be quite different from what you get when you login regularily? Actually, the exact environment you get for your cron is system dependent (or more precisely: Dependent on what the sysadmin decides to give you).

    -- 
    Ronald Fischer <ynnor@mm.st>