Results 1 to 4 of 4

Thread: running crons

  1. #1
    Join Date
    Jan 2012
    Beans
    29

    running crons

    Hi,
    I have a cron setup to run a script at 9:30 every morning that scp's files from another server onto its machine and processes them.

    The SCP happens successfully but the following commands in the script do not seem to execute.

    If I run the script manually however, the whole script executes correctly.

    What could this be?

    many thanks

    Mark

  2. #2
    Join Date
    Jan 2010
    Location
    Sydney, Australia
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: running crons

    # minute (0-59),
    # | hour (0-23),
    # | | day of the month (1-31),
    # | | | month of the year (1-12),
    # | | | | day of the week (0-6 with 0=Sunday).
    # | | | | | commands
    Above is a cron entry syntax that you may use at the begining of your ctontab .

    Please procide more information about your cron scp entry .
    “Progress is made by lazy men looking for easier ways to do things”
    — Robert A. Heinlein

  3. #3
    Join Date
    Apr 2008
    Location
    LOCATION=/dev/random
    Beans
    5,767
    Distro
    Ubuntu Development Release

    Re: running crons

    Can you post your script please.

    It's usually a path issue. As cron runs with little or no environmental variables set up you usually have to use the full path to all commands and files in the script.
    Cheesemill

  4. #4
    Join Date
    Jan 2012
    Beans
    29

    Re: running crons

    Yes that fixed it, just had to make sure that I had full paths to everything.

    Many thanks

    Mark

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
  •