Announcement

Collapse
No announcement yet.

Problems with Cron

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Problems with Cron

    I've been experiencing some problems with cron.

    I wanted to make it execute a script for me. But, before doing this I've decided to see if it was working. So, I typed:

    Code:
    sudo cron status
    It returned the error below:

    Code:
    cron: can't lock /var/run/crond.pid, otherpid may be 3731: Resource temporarily unavailable
    The PID no 3731 actually is cron.

    I also noticed that, it doesn't matter which command I give it, whether it is "sudo cron start" or "sudo cron stop" or "sudo cron 'anything'" it always returns the same message.

    Does anybody have any suggestion to help me solving this problem? Any comment is welcome!

    PS: I haven't edited /etc/crontab. It is exactly the same way as it was when installed.

    #2
    Re: Problems with Cron

    Possible help at:
    https://help.ubuntu.com/community/CronHowto
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Re: Problems with Cron

      Originally posted by LFer
      sudo cron status
      Never heard of that one ...

      Originally posted by LFer
      sudo cron start
      Code:
      sudo /etc/init.d/cron start
      Originally posted by LFer
      sudo cron stop
      Code:
      sudo /etc/init.d/cron stop

      Comment


        #4
        Re: Problems with Cron

        Thanks UnicornRider! That was exactly the problem!

        I forgot to specify the path to the file!

        Using /etc/init.d/cron <command> it works.

        But, I saw in another forum where it was written that the "status" command was used to know the service status, if it was running or not.

        Anyway, thanks a lot for the help!

        Comment


          #5
          Re: Problems with Cron

          Originally posted by LFer
          But, I saw in another forum where it was written that the "status" command was used to know the service status, if it was running or not.
          Sounds like a customization to me (good idea, no default).

          Any properly implemented "init.d script", when called without argument, should be able to tell you what commands are "known" - for example:

          Code:
          ROOT # /etc/init.d/cron
           * Usage: /etc/init.d/cron {start|stop|restart|reload|force-reload}
          From my experience, however, this does not necessarly mean that e.g. "reload" is actually going to do anything - it just says: the command is there, but may or may not be implemented ... feel free to try and see what you'll get

          Comment

          Working...
          X