Solved

Running python script in schedule task server 2008R2

Posted on 2013-12-02
5
1,815 Views
Last Modified: 2013-12-14
Hello,

Task to run python script to delete files from a CIFS share is being executed with following settings:

- Task running as domain admin account which has full permissions wherever needed.
- Task setting of "Run with highest proviliges" is checked.
- Task action: Program/script:  c:\scripts\python\python.exe
                       Add arguments: c:\scripts\python\script.py

the task is working just fine as long as the setting of: "Run only when user is logged on" is checked.

when changing to: "Run whether user is logged on or not" which is what I actually need and entering the correct credentials of the SAME user which is currently logged on to the server, the task does not run, and in the "Last run result" is shows: (0x1) .

the script deletes files in a mapped drive which is mapped to a CIFS share.

Any ideas ?
0
Comment
Question by:iNc0g
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 14

Accepted Solution

by:
BlueCompute earned 400 total points
ID: 39700980
What happens if you create another Domain Admin account and run under its credentials?

What happens if you run the job using a batch file to call python and the script?
0
 
LVL 25

Expert Comment

by:clockwatcher
ID: 39703495
Personally, I would add some logging to the python script to figure out how far it's getting and where it's failing.  Can you post your script?
0
 

Assisted Solution

by:iNc0g
iNc0g earned 0 total points
ID: 39706356
I eventually tried again to schedule the job using a batch file instead of directly approaching the python.exe , it worked this time as long as I used:
start c:\python27\python.exe c:\scripts\script.py  in the batch file instead of just:
c:\python27\python.exe c:\scripts\script.py

thanks for the help.
0
 

Author Closing Comment

by:iNc0g
ID: 39718507
combo of the 2
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Know what services you can and cannot, should and should not combine on your server.
OfficeMate Freezes on login or does not load after login credentials are input.
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question