× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



All,

I'm having an issue with a task scheduler job in Window 7 (that works in
Win XP task scheduler) and I'm running out of ideas to try.

The scheduled task is a batch file named c:\batch\deloldjr.bat.

This is the content of that batch file:

::
:: Deletes files older than AgeLimit days from journal receiver directory
::
set AgeLimit=7
C:\Windows\System32\Forfiles.exe -p "C:\inetpub\ftproot\SystemiJrnRcvrs" -c
"cmd /c del @FILE" -d -%AgeLimit% -m MASTER*

Note that the full path is in there.

If I run the batch file directly in a command window or just double-click
it in Windows explorer, it runs fine. If I try to run it from the task
scheduler (either by the time trigger or right-click and Run) it fails with
opcode 2.

It is set up to run as domainname\administrator, even if no one is signed
on. I have tried it with "highest privileges" and without. I put the full
path name in the program to start and in the start in directory. I also
left the start in directory blank. I've tried removing the
"C:\Windows\System32\" from the FORFILES statement in the batch file. And
I _think_ I've tried every combination of the above. I don't think I would
have entered the administrator password incorrectly a dozen times. These
were all suggestions I found googling. Other scheduled tasks are running.

Anybody got a suggestion to try?



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.