469,268 Members | 981 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,268 developers. It's quick & easy.

Pycron for windows - please help

Al
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

Mar 19 '07 #1
6 6528
En Mon, 19 Mar 2007 16:00:04 -0300, Al <be*****@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

Mar 19 '07 #2
Al
heh... didn't think about that... thanks.

Mar 20 '07 #3
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('start ' + 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 <be*****@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
sg*****@ncee.net | 402-438-8958 | http://www.ncee.net

Leading the Campaign for Economic and Financial Literacy
Mar 20 '07 #4
Al
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\shares\foldername\*.* and now everything
works correctly.

Al

Mar 25 '07 #5
En Sun, 25 Mar 2007 10:17:47 -0300, Al <be*****@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\shares\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

Mar 25 '07 #6
Al
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.

Mar 26 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

28 posts views Thread by Tamir Khason | last post: by
10 posts views Thread by Ger | last post: by
9 posts views Thread by mohit.akl | last post: by
12 posts views Thread by adamurbas | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.