I need help with crontabs

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • GiantGnome
    Confirmed User
    • Jan 2004
    • 4344

    #1

    I need help with crontabs

    I am trying to set up something to update every six hours.

    Is this right?
    Minute Hour Day Month Weekday
    0 */6 * * *

    Command
    /home/username/public_html/hornygnome.com/cgi-bin/tgp/cron.cgi --main

    Im getting this error in my email.
    bin/sh: line 1: /home/username/public_html/hornygnome.com/cgi-bin/tgp/cron.cgi:
    No such file or directory


    Thank you in advance
    NOOOOOOOOOOOOOOOOOOOOOOO-Darth Vader
  • sacX
    Confirmed User
    • Dec 2002
    • 2998

    #2
    ./home/username? you substituted in your username right?

    nonetheless the path looks wrong.
    Have Asian Language Traffic?

    Comment

    • JFPdude
      Confirmed User
      • Jan 2002
      • 4027

      #3
      * 0,6,12,18 * * * /bin/sh /home/username/public_html/hornygnome.com/cgi-bin/tgp/cron.cgi

      Comment

      • V_RocKs
        Damn Right I Kiss Ass!
        • Nov 2003
        • 32451

        #4
        That is a 6hour update yes

        Comment

        • GiantGnome
          Confirmed User
          • Jan 2004
          • 4344

          #5
          Thank you everyone. Yes sacX /home/username is part of the path.

          JFPdude, thank you but where do you come up with /bin/sh? Not that I doubt you, its just I havent read anything about that. I guess thats why its not working.

          Thank you V_RocKs. so the numbers are right but the command to run is wrong?
          NOOOOOOOOOOOOOOOOOOOOOOO-Darth Vader

          Comment

          • JFPdude
            Confirmed User
            • Jan 2002
            • 4027

            #6
            actually you may need to change the /bin/sh to something else but the correct syntax is:

            1 2 3 4 5 commandtorun /path/to/file

            1 = minutes
            2 = hours
            3 = day of month
            4 = month
            5 = day of week 1=monday - 7=sunday

            actually by default if you need /bun/sh to run your file you don't need to put the /bin/sh in there but if you want another program to run the file you need to put the command in. IE: wget

            Comment

            • swedguy
              Confirmed User
              • Jan 2002
              • 7981

              #7
              ls -l /home/username/public_html/hornygnome.com/cgi-bin/tgp/cron.cgi

              Does it find the file if you do that?

              Comment

              • JFPdude
                Confirmed User
                • Jan 2002
                • 4027

                #8
                on most servers /home is really /usr/home and sometimes cron won't run unless you make the path /usr/home/blah blah

                Comment

                • GiantGnome
                  Confirmed User
                  • Jan 2004
                  • 4344

                  #9
                  Originally posted by swedguy
                  ls -l /home/username/public_html/hornygnome.com/cgi-bin/tgp/cron.cgi

                  Does it find the file if you do that?
                  It found it when I did crontab -l in SSH
                  NOOOOOOOOOOOOOOOOOOOOOOO-Darth Vader

                  Comment

                  • JFPdude
                    Confirmed User
                    • Jan 2002
                    • 4027

                    #10
                    that only lists your crontabs ..

                    ls -l /path/to/your/script should find the script

                    Comment

                    • GiantGnome
                      Confirmed User
                      • Jan 2004
                      • 4344

                      #11
                      ls -l /home/username/public_html/hornygnome.com/cgi-bin/tgp/cron.cgi
                      Does it find the file if you do that?
                      No such file or directory


                      that only lists your crontabs ..
                      ls -l /path/to/your/script should find the script
                      No such file or directory.

                      Thanks anyway guys. Ill just sit and wait for host to get back to me.
                      Maybe my icq isnt working.

                      Oops forget the host. I just remembered dont dont do script help.
                      NOOOOOOOOOOOOOOOOOOOOOOO-Darth Vader

                      Comment

                      • JFPdude
                        Confirmed User
                        • Jan 2002
                        • 4027

                        #12
                        hit me up 44-33-144 If you have ssh I'll figure out for you

                        Comment

                        • GiantGnome
                          Confirmed User
                          • Jan 2004
                          • 4344

                          #13
                          Originally posted by JFPdude
                          hit me up 44-33-144 If you have ssh I'll figure out for you
                          Thank you. I just added you
                          NOOOOOOOOOOOOOOOOOOOOOOO-Darth Vader

                          Comment

                          • GiantGnome
                            Confirmed User
                            • Jan 2004
                            • 4344

                            #14
                            Thanks again JFPdude!
                            NOOOOOOOOOOOOOOOOOOOOOOO-Darth Vader

                            Comment

                            Working...