?
Solved

Running python script in schedule task server 2008R2

Posted on 2013-12-02
5
Medium Priority
?
1,914 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 1200 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…
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 …
Suggested Courses
Course of the Month12 days, 23 hours left to enroll

777 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