Find the answer to your Linux question:
Results 1 to 2 of 2
Hi friends, i want to use one script everyday at noon. i think its code will be like this 0 12 * * * and how should i write the ...
  1. #1
    Just Joined!
    Join Date
    Dec 2009
    Posts
    28

    crontab

    Hi friends,

    i want to use one script everyday at noon.
    i think its code will be like this

    0 12 * * *
    and how should i write the script
    like this?

    0 12 * * * ./script.sh
    or should i define it's path?

  2. #2
    Trusted Penguin Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,230
    You are correct about the scheduling line.

    As for the command itself, remember that the commands in crontab may not be executed by the user who wrote the crontab, and therefore you should be as specific as possible. Write the full path to the script (so if it's /home/user/bin/scripts, write all of that out). This way, no matter what the executing user's $PATH is, the script will still be run.
    DISTRO=Arch
    Registered Linux User #388732

Posting Permissions

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