Welcome!

Welcome to Satlover forums, full of great people, ideas and excitement.

Please register if you would like to take part. link..

Register Now

Alert: Don't Use Hotmail Email Accounts for registration

Collapse

Before Access to all Forums and Trial accounts you must need to activate your account Email address

crontab code to check oscam

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • rraja83
    Member
    • May 2011
    • 53

    crontab code to check oscam

    i created a simple script to check if oscam is running and if not start it..
    now script runs ok manually..but when i put in crontab nothing happens...
    i using code like this..
    30 * * * * root /emu/script/./oscamcheck.sh >>/emu/log/oscamCheck.log 2>&1

    my idea is to run it every 30 mins..
    can anyone tell if it is correct because it is not doing anything i waited for hours and hours...
  • mochaart
    Junior Member
    • Oct 2010
    • 22

    #2
    Re: crontab code to check oscam

    Hi,
    I think it must be something with command to be executed. Just provide full path to the script and remove 'root' (if your intention was to put user name for which it should be executed).
    The syntax for crontab file is
    Code:
    *    *    *    *    *  command to be executed
    ┬    ┬    ┬    ┬    ┬
    │    │    │    │    │
    │    │    │    │    │
    │    │    │    │    └───── day of week (0 - 7) (Sunday=0 or 7)
    │    │    │    └────────── month (1 - 12)
    │    │    └─────────────── day of month (1 - 31)
    │    └──────────────────── hour (0 - 23)
    └───────────────────────── min (0 - 59)

    Comment

    • User1
      Member
      • Jun 2011
      • 72

      #3
      Re: crontab code to check oscam

      How are you entering it into the crontab?

      Have you tried the following?

      telnet into the box

      issue

      Code:
      contab -e
      This will edit the root crontab file

      Enter your job
      and then write the file

      Once back at prompt issue

      Code:
      contab -l
      You should now see your job!

      Comment

      • mochaart
        Junior Member
        • Oct 2010
        • 22

        #4
        Re: crontab code to check oscam

        Originally posted by User1

        Code:
        contab -e
        This will edit the root crontab file
        To be precise
        Code:
        crontab -e
        will edit crontab table for logged user.
        But by entering this

        Code:
        crontab -u <user name> -e
        it's possible to edit provided user crontab table (as long as logged user has enough privileges set).

        Comment

        • User1
          Member
          • Jun 2011
          • 72

          #5
          Re: crontab code to check oscam

          mochaart is correct.
          Sorry silly typo error.

          Have you tried this yet?

          Also what box and image are you running this on?

          Comment

          • rraja83
            Member
            • May 2011
            • 53

            #6
            Re: crontab code to check oscam

            Originally posted by azores1
            i mate did you try this cron ?
            and is working good?
            regards
            I was using it for debian linux server and yes it works...just change root to user name ur using..

            Comment

            • uttnls

              #7
              Re: crontab code to check oscam

              Originally posted by rraja83
              i created a simple script to check if oscam is running and if not start it..
              now script runs ok manually..but when i put in crontab nothing happens...
              i using code like this..
              30 * * * * root /emu/script/./oscamcheck.sh >>/emu/log/oscamCheck.log 2>&1

              my idea is to run it every 30 mins..
              can anyone tell if it is correct because it is not doing anything i waited for hours and hours...
              The line in crontab is wrong, when you give a full path don't use the "."

              This will be the correct command

              30 * * * * root /emu/script/oscamcheck.sh >>/emu/log/oscamCheck.log 2>&1

              @rraja83 Why are you misleading people, it will never work like that !

              if still not working use full path to bash like this :

              30 * * * * root /bin/bash /emu/script/oscamcheck.sh >> /emu/log/oscamCheck.log 2>&1

              Comment

              Working...