Cron a .sh that outputs txt files

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • drexnefex
    New Member
    • Jun 2010
    • 1

    #1

    Cron a .sh that outputs txt files

    hello - i have a cron job that runs a .sh script. the .sh script outputs a few txt files to the same dir it resides in.

    when the cron runs, it outputs the txt files to the root of my website rather than to the sub-dir that the .sh file resides in.

    any idea what i need to do to get the cron to write the txts files the .sh script generates to the same dir?

    here's my cron
    */30 * * * * /pathtomyscript/script.sh

    thanks!
  • numberwhun
    Recognized Expert Moderator Specialist
    • May 2007
    • 3467

    #2
    Originally posted by drexnefex
    hello - i have a cron job that runs a .sh script. the .sh script outputs a few txt files to the same dir it resides in.

    when the cron runs, it outputs the txt files to the root of my website rather than to the sub-dir that the .sh file resides in.

    any idea what i need to do to get the cron to write the txts files the .sh script generates to the same dir?

    here's my cron
    */30 * * * * /pathtomyscript/script.sh

    thanks!
    It would certainly help if you could paste the contents of the script into here as well, so that we can see what its doing, in case it is the culprit, and not actually a cron issue.

    Regards,

    Jeff

    Comment

    Working...