Solved

Running python script in schedule task server 2008R2

Posted on 2013-12-02
5
1,636 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
  • 2
5 Comments
 
LVL 14

Accepted Solution

by:
BlueCompute earned 400 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
combo of the 2
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…

763 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now