This is all the code in batch file ((DataDel.bat, E:\Program Files\t)
--------
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe "& 'E:\Program Files\t\DataDel.ps1'"

--------

Here are the steps i am following while creating the job:
1) Under "Jobs" section, i have created a folder "DataDeletion"
2) Under "DataDeletion", right click and select "New -> Job"
3) At step 1 of job properties wizard, named new job as "DataDel_BatchCallPowerShell" and selected "Run program of batch file" option
4) Click "Next"
4) At step 2 of job properties wizard,
under "Command line:" - selected as "E:\Program Files\t\DataDel.bat" (without quotes)
under "Start in:" - select as "E:\Program Files\t" (without quotes)
5) At step 3, click "Finish"

Ran the jon in normal mode, and Job log shows that "Job started", but never finishes and nothing else recorded in the event log.

I am running this on OS Windows 2008 R2 (64 bit) machine.

I have opened 24x7 scheduler in Administrator mode.

Sat Mar 16, 2013 11:50 am

SysOpSite Admin

Joined: 26 Nov 2006Posts: 6571

I see several issues, mostly problems with missing or incorrect quotes.

The error indicates that "E:\Program Files\t" value specified for the Startin directory is an invalid path. Please verify this path is correct and accessible to the account running 24x7 Scheduler.

Mon Mar 18, 2013 8:14 am

kishorepi

Joined: 11 Mar 2013Posts: 10Country: United States

I gave the startup directory as "C\Windows\system32\WindowsPowerShell\v1.0" as you suggested.

I didn't understand "accessible to the account running 24x7 Scheduler".
- I logged on using my own credentails and i am administrator on the box
- I also tried running the scheduler As admin, it didn't work with that either

Let me know if i need to set the user somewhere so that 24x7 schduler runs with that particular account.