Pycron for windows - please help

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

    #1

    Pycron for windows - please help

    Hey all,

    I'm using Pycron for windows to run 5 scripts at various times of
    the day, all of which work well.

    I recently added a 6th job, a simply file copy operation, and it won't
    run. Once the job is configured, I click the test execution button,
    and it works fine. However, it won't run automatically.

    I looked in the pycron.log file, and I noticed that for the entires of
    my new job, I see "rc=4" and the end of each line. All other jobs have
    "rc=0" at the end of the line. I assume then, that rc=4 is a reference
    to an error code of some kind, but there is no information on this in
    the readme.txt, at the pycron website, or here in groups.

    Does anyone know how to troubleshhot this? Thanks in advance.

    Al

  • Gabriel Genellina

    #2
    Re: Pycron for windows - please help

    En Mon, 19 Mar 2007 16:00:04 -0300, Al <bernala@gmail. comescribió:
    I looked in the pycron.log file, and I noticed that for the entires of
    my new job, I see "rc=4" and the end of each line. All other jobs have
    "rc=0" at the end of the line. I assume then, that rc=4 is a reference
    to an error code of some kind, but there is no information on this in
    the readme.txt, at the pycron website, or here in groups.
    >
    Does anyone know how to troubleshhot this? Thanks in advance.
    Contacting the author?

    --
    Gabriel Genellina

    Comment

    • Al

      #3
      Re: Pycron for windows - please help

      heh... didn't think about that... thanks.

      Comment

      • Shane Geiger

        #4
        Re: Pycron for windows - please help

        Here's something else you should consider: Look at the source code of
        pycron. I just downloaded it. Much to my surprise, this is implemented
        in about 115 lines of code.

        In particular, look at the run() function. You should try adding a
        try-except block around the system call to get a hint as to where the
        problem lies:


        try:
        os.system('star t ' + command)



        except:

        print "Unexpected error to catch:",
        sys.exc_info()[0]


        I've been trying to use it myself (on a Mac) since I saw you mention it
        on the mailing list. I'm also having problems using pycron. Email me
        directly if you figure out the problem. I'll do the same for you.





        Gabriel Genellina wrote:
        En Mon, 19 Mar 2007 16:00:04 -0300, Al <bernala@gmail. comescribió:
        >
        >
        >I looked in the pycron.log file, and I noticed that for the entires of
        >my new job, I see "rc=4" and the end of each line. All other jobs have
        >"rc=0" at the end of the line. I assume then, that rc=4 is a reference
        >to an error code of some kind, but there is no information on this in
        >the readme.txt, at the pycron website, or here in groups.
        >>
        >Does anyone know how to troubleshhot this? Thanks in advance.
        >>
        >
        Contacting the author?
        >
        >
        --
        Shane Geiger
        IT Director
        National Council on Economic Education
        sgeiger@ncee.ne t | 402-438-8958 | http://www.ncee.net

        Leading the Campaign for Economic and Financial Literacy


        Comment

        • Al

          #5
          Re: Pycron for windows - please help

          Shane,

          I figured it out... Pycron does not work with mapped drives. My
          script was supposed to copy files from a mapped drive to a local
          folder... I had set up my batch command as copy M:\foldername\* .*,
          where M: is a mapped drive pointing to the network share; M: is
          defined on the PC running the Pycron service of course. I changed it
          to read copy \\servername\sh ares\foldername \*.* and now everything
          works correctly.

          Al

          Comment

          • Gabriel Genellina

            #6
            Re: Pycron for windows - please help

            En Sun, 25 Mar 2007 10:17:47 -0300, Al <bernala@gmail. comescribió:
            I figured it out... Pycron does not work with mapped drives. My
            script was supposed to copy files from a mapped drive to a local
            folder... I had set up my batch command as copy M:\foldername\* .*,
            where M: is a mapped drive pointing to the network share; M: is
            defined on the PC running the Pycron service of course. I changed it
            to read copy \\servername\sh ares\foldername \*.* and now everything
            works correctly.
            Mapped drives are per-user. Usually, services run under the LOCAL_SYSTEM
            account, not using the currently logged user (because they may start even
            before any user is logged). If you want the service to have access to your
            mapped drives, use the service control panel to make it run under another
            account.

            --
            Gabriel Genellina

            Comment

            • Al

              #7
              Re: Pycron for windows - please help

              Mapped drives are per-user. Usually, services run under the LOCAL_SYSTEM
              account, not using the currently logged user (because they may start even
              before any user is logged). If you want the service to have access to your
              mapped drives, use the service control panel to make it run under another
              account.
              Pycron runs under our domain admin account, and the computer on which
              it runs is always on. I tried changing the account anyway, but no luck.

              Comment

              Working...