Task Schedular Problem.

  • Thread starter Thread starter Barry Dilka
  • Start date Start date
B

Barry Dilka

Guest
Hello, I have several tasks and apps that have been scheduled to run and

have been working for some time. Now the tasks seem to run, but do not work

interactively (by this I mean there is no window or app displayed on the

desktop).



If I look at Task Manage, I can see it in the list, but nothing on screen.



I created a new taks several times today for "cmd.exe". Again, it shows up

in Task manager, but nada.



I reset my password, the administrator password and even created a new

account belonging to the Admin Group. Same thing?



Windows XP, SP3 with all the hotfixes, patches and updates.



This just started yesterday after 12:00 noon (that was the end time of my

last scheduled task).



Help would be appreciated.



Thanks
 
"Barry Dilka" wrote in message

news:#61KLURxKHA.404@TK2MSFTNGP02.phx.gbl...

> Hello, I have several tasks and apps that have been scheduled to run and

> have been working for some time. Now the tasks seem to run, but do not

> work interactively (by this I mean there is no window or app displayed on

> the desktop).

>

> If I look at Task Manage, I can see it in the list, but nothing on screen.

>

> I created a new taks several times today for "cmd.exe". Again, it shows up

> in Task manager, but nada.

>

> I reset my password, the administrator password and even created a new

> account belonging to the Admin Group. Same thing?

>

> Windows XP, SP3 with all the hotfixes, patches and updates.

>

> This just started yesterday after 12:00 noon (that was the end time of my

> last scheduled task).

>

> Help would be appreciated.

>

> Thanks




There are two conditions for a scheduled task to be visible in a foreground

session:

- You must schedule the task to run under the same account as your

foreground session

- You must tick the box that allows tasks to interact with the desktop. If

you use schtasks.exe then you must use the /it switch.
 
Thank you for the reply.



1) I made sure that the task was to run under the same account as I am

logged in as (foreground session),

2) I checked "every" dialog box and can't see any box that says "Allow the

task...".



If I run the "AT" command, I get nothing in the list, although the task is

in the GUI. I then created a task using "AT" with the /interactive switch.

Again, it shows up in Task Manager when it is scheduled to run, but nada on

the desktop.



Even using "at \\mypcname" from one of my servers show nothing in the task

list. Neither does it show anything locally.



Man, if I gotta go back to my True Image backup then ok, but I'd still like

to know the why. This comes more from the days when I kept my MCSE up to

date - but that was then.



Again, thanks for the assist.



"Pegasus [MVP]" wrote in message

news:O%23z7YZRxKHA.6140@TK2MSFTNGP05.phx.gbl...

>

>

> "Barry Dilka" wrote in message

> news:#61KLURxKHA.404@TK2MSFTNGP02.phx.gbl...

>> Hello, I have several tasks and apps that have been scheduled to run and

>> have been working for some time. Now the tasks seem to run, but do not

>> work interactively (by this I mean there is no window or app displayed on

>> the desktop).

>>

>> If I look at Task Manage, I can see it in the list, but nothing on

>> screen.

>>

>> I created a new taks several times today for "cmd.exe". Again, it shows

>> up in Task manager, but nada.

>>

>> I reset my password, the administrator password and even created a new

>> account belonging to the Admin Group. Same thing?

>>

>> Windows XP, SP3 with all the hotfixes, patches and updates.

>>

>> This just started yesterday after 12:00 noon (that was the end time of my

>> last scheduled task).

>>

>> Help would be appreciated.

>>

>> Thanks


>

> There are two conditions for a scheduled task to be visible in a

> foreground session:

> - You must schedule the task to run under the same account as your

> foreground session

> - You must tick the box that allows tasks to interact with the desktop. If

> you use schtasks.exe then you must use the /it switch.
 
[Update...] Re: Task Schedular Problem.

I figured I'd do a System Restore to last week, nothing has been added/nuked

or changed to the system, so I figured why not.



It won't restore. The system says that the Restore Failed.



Obviously something really wrong here. Going to try a few more things from

thread off the web, but it looks like a True Image Restore.



Thanks again.



"Barry Dilka" wrote in message

news:eA5dK3RxKHA.6140@TK2MSFTNGP05.phx.gbl...

> Thank you for the reply.

>

> 1) I made sure that the task was to run under the same account as I am

> logged in as (foreground session),

> 2) I checked "every" dialog box and can't see any box that says "Allow the

> task...".

>

> If I run the "AT" command, I get nothing in the list, although the task is

> in the GUI. I then created a task using "AT" with the /interactive switch.

> Again, it shows up in Task Manager when it is scheduled to run, but nada

> on the desktop.

>

> Even using "at \\mypcname" from one of my servers show nothing in the task

> list. Neither does it show anything locally.

>

> Man, if I gotta go back to my True Image backup then ok, but I'd still

> like to know the why. This comes more from the days when I kept my MCSE up

> to date - but that was then.

>

> Again, thanks for the assist.

>

> "Pegasus [MVP]" wrote in message

> news:O%23z7YZRxKHA.6140@TK2MSFTNGP05.phx.gbl...

>>

>>

>> "Barry Dilka" wrote in message

>> news:#61KLURxKHA.404@TK2MSFTNGP02.phx.gbl...

>>> Hello, I have several tasks and apps that have been scheduled to run and

>>> have been working for some time. Now the tasks seem to run, but do not

>>> work interactively (by this I mean there is no window or app displayed

>>> on the desktop).

>>>

>>> If I look at Task Manage, I can see it in the list, but nothing on

>>> screen.

>>>

>>> I created a new taks several times today for "cmd.exe". Again, it shows

>>> up in Task manager, but nada.

>>>

>>> I reset my password, the administrator password and even created a new

>>> account belonging to the Admin Group. Same thing?

>>>

>>> Windows XP, SP3 with all the hotfixes, patches and updates.

>>>

>>> This just started yesterday after 12:00 noon (that was the end time of

>>> my last scheduled task).

>>>

>>> Help would be appreciated.

>>>

>>> Thanks


>>

>> There are two conditions for a scheduled task to be visible in a

>> foreground session:

>> - You must schedule the task to run under the same account as your

>> foreground session

>> - You must tick the box that allows tasks to interact with the desktop.

>> If you use schtasks.exe then you must use the /it switch.


>

>
 
[Update...] Re: Task Schedular Problem.

You never reported what you're actually running, so let's try a simple test

that works perfectly well on my machine. Type this command from a Command

Prompt:



schtasks /create /ru "%Username%" /rp YourPassword /It /sc Once /ST HH:MM

/TN Test /tr notepad.exe







"Barry Dilka" wrote in message

news:#07B4WSxKHA.2432@TK2MSFTNGP04.phx.gbl...

> I figured I'd do a System Restore to last week, nothing has been

> added/nuked or changed to the system, so I figured why not.

>

> It won't restore. The system says that the Restore Failed.

>

> Obviously something really wrong here. Going to try a few more things from

> thread off the web, but it looks like a True Image Restore.

>

> Thanks again.

>

> "Barry Dilka" wrote in message

> news:eA5dK3RxKHA.6140@TK2MSFTNGP05.phx.gbl...

>> Thank you for the reply.

>>

>> 1) I made sure that the task was to run under the same account as I am

>> logged in as (foreground session),

>> 2) I checked "every" dialog box and can't see any box that says "Allow

>> the task...".

>>

>> If I run the "AT" command, I get nothing in the list, although the task

>> is in the GUI. I then created a task using "AT" with the /interactive

>> switch. Again, it shows up in Task Manager when it is scheduled to run,

>> but nada on the desktop.

>>

>> Even using "at \\mypcname" from one of my servers show nothing in the

>> task list. Neither does it show anything locally.

>>

>> Man, if I gotta go back to my True Image backup then ok, but I'd still

>> like to know the why. This comes more from the days when I kept my MCSE

>> up to date - but that was then.

>>

>> Again, thanks for the assist.

>>

>> "Pegasus [MVP]" wrote in message

>> news:O%23z7YZRxKHA.6140@TK2MSFTNGP05.phx.gbl...

>>>

>>>

>>> "Barry Dilka" wrote in message

>>> news:#61KLURxKHA.404@TK2MSFTNGP02.phx.gbl...

>>>> Hello, I have several tasks and apps that have been scheduled to run

>>>> and have been working for some time. Now the tasks seem to run, but do

>>>> not work interactively (by this I mean there is no window or app

>>>> displayed on the desktop).

>>>>

>>>> If I look at Task Manage, I can see it in the list, but nothing on

>>>> screen.

>>>>

>>>> I created a new taks several times today for "cmd.exe". Again, it shows

>>>> up in Task manager, but nada.

>>>>

>>>> I reset my password, the administrator password and even created a new

>>>> account belonging to the Admin Group. Same thing?

>>>>

>>>> Windows XP, SP3 with all the hotfixes, patches and updates.

>>>>

>>>> This just started yesterday after 12:00 noon (that was the end time of

>>>> my last scheduled task).

>>>>

>>>> Help would be appreciated.

>>>>

>>>> Thanks

>>>

>>> There are two conditions for a scheduled task to be visible in a

>>> foreground session:

>>> - You must schedule the task to run under the same account as your

>>> foreground session

>>> - You must tick the box that allows tasks to interact with the desktop.

>>> If you use schtasks.exe then you must use the /it switch.


>>

>>


>

>
 
Pegasus wrote:



> There are two conditions for a scheduled task to be visible in a foreground

> session:

> - You must schedule the task to run under the same account as your

> foreground session




Presumably you are talking about the "Run as" option. By default, the

account under which you are logged in is the one pre-entered as the RunAs

account when you create a new task.



> - You must tick the box that allows tasks to interact with the desktop. If

> you use schtasks.exe then you must use the /it switch.




I did not find any such option. I'm using Windows XP Pro SP-3. Maybe that

is an option available in Windows Vista/7 (to let users configure a task so

it runs hidden).



When running "schtasks /?" or "schtasks /create /?", no /IT parameter is

mentioned. Didn't find the /IT parameter mentioned at:



http://technet.microsoft.com/en-us/library/bb490996.aspx



However, I did see mention of /IT at:



http://msdn.microsoft.com/en-us/library/bb736357(VS.85).aspx



Notice it says that /IT is *not* available on Windows XP/2003.
 
[Update...] Re: Task Schedular Problem.

Thanks Pegasus. I ran your example on my Windows XP SP3 machine, replacing

the appropriate parms with the needed ones.



I get this error: ERROR:

Invalid Argument/Option - '/It'

Type "SCHTASKS /CREATE /?" for usage.



SCHTASKS /CREATE /?, does not show an switch for /It





"Pegasus [MVP]" wrote in message

news:O%231W75UxKHA.3896@TK2MSFTNGP02.phx.gbl...

> You never reported what you're actually running, so let's try a simple

> test that works perfectly well on my machine. Type this command from a

> Command Prompt:

>

> schtasks /create /ru "%Username%" /rp YourPassword /It /sc Once /ST HH:MM

> /TN Test /tr notepad.exe

>

>

>

> "Barry Dilka" wrote in message

> news:#07B4WSxKHA.2432@TK2MSFTNGP04.phx.gbl...

>> I figured I'd do a System Restore to last week, nothing has been

>> added/nuked or changed to the system, so I figured why not.

>>

>> It won't restore. The system says that the Restore Failed.

>>

>> Obviously something really wrong here. Going to try a few more things

>> from thread off the web, but it looks like a True Image Restore.

>>

>> Thanks again.

>>

>> "Barry Dilka" wrote in message

>> news:eA5dK3RxKHA.6140@TK2MSFTNGP05.phx.gbl...

>>> Thank you for the reply.

>>>

>>> 1) I made sure that the task was to run under the same account as I am

>>> logged in as (foreground session),

>>> 2) I checked "every" dialog box and can't see any box that says "Allow

>>> the task...".

>>>

>>> If I run the "AT" command, I get nothing in the list, although the task

>>> is in the GUI. I then created a task using "AT" with the /interactive

>>> switch. Again, it shows up in Task Manager when it is scheduled to run,

>>> but nada on the desktop.

>>>

>>> Even using "at \\mypcname" from one of my servers show nothing in the

>>> task list. Neither does it show anything locally.

>>>

>>> Man, if I gotta go back to my True Image backup then ok, but I'd still

>>> like to know the why. This comes more from the days when I kept my MCSE

>>> up to date - but that was then.

>>>

>>> Again, thanks for the assist.

>>>

>>> "Pegasus [MVP]" wrote in message

>>> news:O%23z7YZRxKHA.6140@TK2MSFTNGP05.phx.gbl...

>>>>

>>>>

>>>> "Barry Dilka" wrote in message

>>>> news:#61KLURxKHA.404@TK2MSFTNGP02.phx.gbl...

>>>>> Hello, I have several tasks and apps that have been scheduled to run

>>>>> and have been working for some time. Now the tasks seem to run, but do

>>>>> not work interactively (by this I mean there is no window or app

>>>>> displayed on the desktop).

>>>>>

>>>>> If I look at Task Manage, I can see it in the list, but nothing on

>>>>> screen.

>>>>>

>>>>> I created a new taks several times today for "cmd.exe". Again, it

>>>>> shows up in Task manager, but nada.

>>>>>

>>>>> I reset my password, the administrator password and even created a new

>>>>> account belonging to the Admin Group. Same thing?

>>>>>

>>>>> Windows XP, SP3 with all the hotfixes, patches and updates.

>>>>>

>>>>> This just started yesterday after 12:00 noon (that was the end time of

>>>>> my last scheduled task).

>>>>>

>>>>> Help would be appreciated.

>>>>>

>>>>> Thanks

>>>>

>>>> There are two conditions for a scheduled task to be visible in a

>>>> foreground session:

>>>> - You must schedule the task to run under the same account as your

>>>> foreground session

>>>> - You must tick the box that allows tasks to interact with the desktop.

>>>> If you use schtasks.exe then you must use the /it switch.

>>>

>>>


>>

>>
 
Barry Dilka wrote:



> If I run the "AT" command, I get nothing in the list, although the task is

> in the GUI. I then created a task using "AT" with the /interactive switch.

> Again, it shows up in Task Manager when it is scheduled to run, but nada on

> the desktop.

>

> Even using "at \\mypcname" from one of my servers show nothing in the task

> list. Neither does it show anything locally.




In the "Run as" option for the task, did you just enter your Windows account

or did you include your host's computer name?



\







Did you use the first format shown above in the RunAs setting?



Is it that the task never runs? Or is it that the task runs but shows no

window (that it used to show before)? Same thing happen with you

right-click on a task and select Run?



Have you check the log for any warn/error messages? Advanced menu -> View

Log. It rolls around (rather than truncate from the top to append to the

end). Look for the "[ ***** Most recent entry is above this line ***** ]"

line.



When you manually run the task, does a button for it show up in the Windows

taskbar? If so, does the task run a shortcut (.lnk file)? If you use a

shortcut to run the program, it could be the shortcut's properties are

defined to run with a minimized window so all you will see is the taskbar

button.
 
[Update...] Re: Task Schedular Problem.

Okay, so I read the next post and removed the /It parm and got a messaging

indicating that the task may not run as the account information could not

set.



I checked (and reset my password), logged off and on using my account with

my password with no problem.



Any ideas here, it's beginning to look like it's account related?



Perhaps, rebooting into safe mode and trying may reveal something.



I'll post...



Thanks all



"Pegasus [MVP]" wrote in message

news:O%231W75UxKHA.3896@TK2MSFTNGP02.phx.gbl...

> You never reported what you're actually running, so let's try a simple

> test that works perfectly well on my machine. Type this command from a

> Command Prompt:

>

> schtasks /create /ru "%Username%" /rp YourPassword /It /sc Once /ST HH:MM

> /TN Test /tr notepad.exe

>

>

>

> "Barry Dilka" wrote in message

> news:#07B4WSxKHA.2432@TK2MSFTNGP04.phx.gbl...

>> I figured I'd do a System Restore to last week, nothing has been

>> added/nuked or changed to the system, so I figured why not.

>>

>> It won't restore. The system says that the Restore Failed.

>>

>> Obviously something really wrong here. Going to try a few more things

>> from thread off the web, but it looks like a True Image Restore.

>>

>> Thanks again.

>>

>> "Barry Dilka" wrote in message

>> news:eA5dK3RxKHA.6140@TK2MSFTNGP05.phx.gbl...

>>> Thank you for the reply.

>>>

>>> 1) I made sure that the task was to run under the same account as I am

>>> logged in as (foreground session),

>>> 2) I checked "every" dialog box and can't see any box that says "Allow

>>> the task...".

>>>

>>> If I run the "AT" command, I get nothing in the list, although the task

>>> is in the GUI. I then created a task using "AT" with the /interactive

>>> switch. Again, it shows up in Task Manager when it is scheduled to run,

>>> but nada on the desktop.

>>>

>>> Even using "at \\mypcname" from one of my servers show nothing in the

>>> task list. Neither does it show anything locally.

>>>

>>> Man, if I gotta go back to my True Image backup then ok, but I'd still

>>> like to know the why. This comes more from the days when I kept my MCSE

>>> up to date - but that was then.

>>>

>>> Again, thanks for the assist.

>>>

>>> "Pegasus [MVP]" wrote in message

>>> news:O%23z7YZRxKHA.6140@TK2MSFTNGP05.phx.gbl...

>>>>

>>>>

>>>> "Barry Dilka" wrote in message

>>>> news:#61KLURxKHA.404@TK2MSFTNGP02.phx.gbl...

>>>>> Hello, I have several tasks and apps that have been scheduled to run

>>>>> and have been working for some time. Now the tasks seem to run, but do

>>>>> not work interactively (by this I mean there is no window or app

>>>>> displayed on the desktop).

>>>>>

>>>>> If I look at Task Manage, I can see it in the list, but nothing on

>>>>> screen.

>>>>>

>>>>> I created a new taks several times today for "cmd.exe". Again, it

>>>>> shows up in Task manager, but nada.

>>>>>

>>>>> I reset my password, the administrator password and even created a new

>>>>> account belonging to the Admin Group. Same thing?

>>>>>

>>>>> Windows XP, SP3 with all the hotfixes, patches and updates.

>>>>>

>>>>> This just started yesterday after 12:00 noon (that was the end time of

>>>>> my last scheduled task).

>>>>>

>>>>> Help would be appreciated.

>>>>>

>>>>> Thanks

>>>>

>>>> There are two conditions for a scheduled task to be visible in a

>>>> foreground session:

>>>> - You must schedule the task to run under the same account as your

>>>> foreground session

>>>> - You must tick the box that allows tasks to interact with the desktop.

>>>> If you use schtasks.exe then you must use the /it switch.

>>>

>>>


>>

>>
 
[Update...] Re: Task Schedular Problem.

Barry Dilka wrote:



> I checked (and reset my password), logged off and on using my account with

> my password with no problem.




Just to be sure, do you have a *non-blank* password assigned to your Windows

account (under which the scheduled task runs)? Scheduled tasks won't run on

accounts with blank passwords.
 
All excellent questions, let me go over them:



1) \\computername\username,

2) The task never runs. Actually (depending on the task) it may or may not

show up in the Task Manager, but not interactively. Notepad for example is

displayed in TM, but that's it,

3) No errors in the log (neither of them),

4) Nothing shows up on the task bar - assuming a task runs. So for example,

in the command script that I tried earlier, I have several observations: a)

The task shows up in the GUI Task schedular (not at the command prompt with

"AT") After the scheduled time, the event remains in the GUI display,

5) If I right-click the task and select run, nothing happens at all,

6) Not a shortcut. I actually browsed to the app and selected it, also made

sure I specified that the "Start in..." folder was apropriate (for example,

for notepad, it pointed to the winroot\sys32 dir...).



I'm really thinking a virus or something, but I've ran Bitdefender (which

has never failed me), Malware Bytes and Super AntiSpyware they found

nothing.



I then ran sfc /scannow and sfc /scanonce. Nothing happened there.



I did however, boot my Bitdefender RescueCD (Linux boot) and ran a scan on

the Windows, Program Files and Docs/Setting dir. The only item found was

NDIS.SYS (ddlcache and sys32\drivers). It was infected with

"Kobcka.Patched.Gen". I had Bitdefender nuke it.



Of course when I rebooted normally, no network. Expanded Ndis.sy_ from SP3

and now that's fine.



But I'm still suspicious.



If anyone has any "last ditch" thoughts before I True Image this bad boy, it

would be appreciated.



In any case, I really do want to thank everyone for the daunting efforts,

advise and pointers.



I'll post laster.



Cheers all...



"VanguardLH" wrote in message

news:hnotd7$jn7$1@news.albasani.net...

> Barry Dilka wrote:

>

>> If I run the "AT" command, I get nothing in the list, although the task

>> is

>> in the GUI. I then created a task using "AT" with the /interactive

>> switch.

>> Again, it shows up in Task Manager when it is scheduled to run, but nada

>> on

>> the desktop.

>>

>> Even using "at \\mypcname" from one of my servers show nothing in the

>> task

>> list. Neither does it show anything locally.


>

> In the "Run as" option for the task, did you just enter your Windows

> account

> or did you include your host's computer name?

>

> \

>

>

>

> Did you use the first format shown above in the RunAs setting?

>

> Is it that the task never runs? Or is it that the task runs but shows no

> window (that it used to show before)? Same thing happen with you

> right-click on a task and select Run?

>

> Have you check the log for any warn/error messages? Advanced menu -> View

> Log. It rolls around (rather than truncate from the top to append to the

> end). Look for the "[ ***** Most recent entry is above this line ***** ]"

> line.

>

> When you manually run the task, does a button for it show up in the

> Windows

> taskbar? If so, does the task run a shortcut (.lnk file)? If you use a

> shortcut to run the program, it could be the shortcut's properties are

> defined to run with a minimized window so all you will see is the taskbar

> button.
 
[Update...] Re: Task Schedular Problem.

The password is not blank, absolutely for sure, positive, Aok.

I also made absolutely sure that I entered my password in the scheduled

task wizard (and the command script earlier). I even ticked off the box that

says "The use must be logged in...). I tried both ways, logged in and not

logged in.



This is sooooo weird, just all of a sudden.



Thanks.

"VanguardLH" wrote in message

news:hnovs6$ndi$1@news.albasani.net...

> Barry Dilka wrote:

>

>> I checked (and reset my password), logged off and on using my account

>> with

>> my password with no problem.


>

> Just to be sure, do you have a *non-blank* password assigned to your

> Windows

> account (under which the scheduled task runs)? Scheduled tasks won't run

> on

> accounts with blank passwords.
 
Barry Dilka wrote:



> 1) \\computername\username,




The prepended slashes ("\\") should be removed when entering the computer

and account for the Run As parameter's value when using the Task Scheduler

GUI. Just use "\"



schtasks has its own separate /S parameter to specify the computer's name,

so don't prepend "\\" there, either. Use "/S /U "

(omit the /S parameter if you are creating the task on your own host).



The "\\" before is only added when using the at.exe command-

line program.



> 2) The task never runs. Actually (depending on the task) it may or may not

> show up in the Task Manager, but not interactively. Notepad for example is

> displayed in TM, but that's it,




I forgot to check your prior posts. Did you check the scheduler service

("Task Scheduler") is defined, set to Automatic startup mode, and is current

in a running state?



- Run: services.msc (must be logged under an admin-level account)

- Look for the "Task Scheduler" service.

- Check the service is currently running (started).

- Check the service is configured for Automatic startup.

- Check the service starts under the "Local System" (SYSTEM) account, not

under a specific account (which may not even exist anymore).

o Here is the option "Allow service to interact with desktop" that Pegasus

might've referred to. I've never had this option enabled yet I've been

able to create scheduled tasks and see them run (if they open a window

although some programs don't need a console to run or only use a tray

icon).

- Under the Log On tab, check this service enabled for all hardware profiles

listed (or, at least, the hardware profiles where you want it active).

For example, you could define normal and game hardware profiles where the

game profile doesn't enable many services that aren't needed when you boot

and select the game profile. This eliminates conflicts, problems, and

unnecessary resource consumption when playing a game if you use a hardware

profile and select it during bootup of Windows.





> 3) No errors in the log (neither of them),




Expected if the job never executes that is being monitored by Task

Scheduler. So it looks like the task never does get executed. If you add

the task using the GUI for Task Scheduler, do you see the job show up in

that GUI? If so, right-click and select Run. Do you see that program's

window now even if only for a short time if the program runs quickly? Does

that program actually run without error? If it errors, like not even

loading, then there won't be a window but you should see a log entry

accounting for the failure. Will the program run from Start -> Run? If is

is a console-mode program, open a command shell (cmd.exe) and run the

command string to make sure what you think should run actually will run.



> 4) Nothing shows up on the task bar - assuming a task runs. So for example,

> in the command script that I tried earlier, I have several observations: a)

> The task shows up in the GUI Task schedular (not at the command prompt with

> "AT") After the scheduled time, the event remains in the GUI display,




'at' tasks do not automatically cleanup after themself even when scheduled

to run just once. Even the jobs you define in the GUI for Task Scheduler

will not disappear when scheduled to run only once. You have to enable the

option "Delete the task if not scheduled to run again" to have it disappear

after it ran its one time.



You say an 'at' defined job is showing up in the Task Scheduler's GUI. So

it does look like it is getting defined. You say the job doesn't run at its

scheduled time. Are you sure that you are using 24-hour military time when

specifying the start time? There is no AM/PM paramter to the 'at' or

'schtask' programs. If you want the job to run at 5:17PM then you have to

enter "17:17" for the time value. When using the GUI to Task Scheduler, you

are shown times with AM/PM affixes to ensure you are picking the correct

time, but 'at' and 'schtask' require 24-hour format. 'schtasks /create /?'

at least warns you about that for its /ST parameter but help for 'at' is

very terse.



> 5) If I right-click the task and select run, nothing happens at all,




Which leads me to believe that either you don't have permissions to run the

program specified in the Run field or you have an invalid program filename

or the parameters to that program are invalid.



In the GUI for Task Scheduler, look at the properties for the job you say is

there. Copy the Run field's value. Open a command shell (cmd.exe). Paste

the command string to ensure you are running exactly the same entire command

string (program and parameters). Don't hand copy the value of the Run

field. Copy and paste so you have an exact copy of the entire string. Does

it run from the command shell?



If it doesn't run from the command shell, the problem isn't with Task

Scheduler at all and simplifies to why you cannot run that command. It

could be something as simply as you forgeting to enclose strings within

double-quotes that contain spaces.



C:\Program Files\Internet Explorer\iexplore.exe -nohome



is not a valid command string because of the spaces embedded in the path to

the executable file (and the executable file could also have spaces).

Parsing would end at "C:\Program" but no such file "Program" (with no

extension, too) would be found under "C:\". The proper command would be:



"C:\Program Files\Internet Explorer\iexplorer.exe" -nohome
 
[Resovlved] Re: Task Schedular Problem.

As Ja Ja Binks would say "Me give up, me give up". I True Imaged the drive.

I figured with all the help, suggestions and pointers here and not really

getting anywhere - so what the hey.



I do want to thank everyone for all the great help, pointers and assistance.

It is/was greatly appreciated.



Please review my comments below in response to the questions in this post. I

like to complete details as much as possible.



NB: I mentioned in an earlier post that I was going to try Scheduling a Task

in Safe Mode - I then remembered that the Schedular Service won't fire in

SM, so I didn't perform that setp.



Cheers to all...



"VanguardLH" wrote in message

news:hnp3oi$t7t$1@news.albasani.net...

> Barry Dilka wrote:

>

>> 1) \\computername\username,


>

> The prepended slashes ("\\") should be removed when entering the computer

> and account for the Run As parameter's value when using the Task Scheduler

> GUI. Just use "\"

>

> schtasks has its own separate /S parameter to specify the computer's name,

> so don't prepend "\\" there, either. Use "/S /U

> "

> (omit the /S parameter if you are creating the task on your own host).

>

> The "\\" before is only added when using the at.exe

> command-

> line program.

>

>> 2) The task never runs. Actually (depending on the task) it may or may

>> not

>> show up in the Task Manager, but not interactively. Notepad for example

>> is

>> displayed in TM, but that's it,


>




No Worries, the Schedular was running. Yes indeedy, it was set to Auto...



> I forgot to check your prior posts. Did you check the scheduler service

> ("Task Scheduler") is defined, set to Automatic startup mode, and is

> current

> in a running state?

>

> - Run: services.msc (must be logged under an admin-level account)

> - Look for the "Task Scheduler" service.

> - Check the service is currently running (started).

> - Check the service is configured for Automatic startup.

> - Check the service starts under the "Local System" (SYSTEM) account, not

> under a specific account (which may not even exist anymore).

> o Here is the option "Allow service to interact with desktop" that

> Pegasus

> might've referred to. I've never had this option enabled yet I've been

> able to create scheduled tasks and see them run (if they open a window

> although some programs don't need a console to run or only use a tray

> icon).

> - Under the Log On tab, check this service enabled for all hardware

> profiles

> listed (or, at least, the hardware profiles where you want it active).

> For example, you could define normal and game hardware profiles where the

> game profile doesn't enable many services that aren't needed when you

> boot

> and select the game profile. This eliminates conflicts, problems, and

> unnecessary resource consumption when playing a game if you use a

> hardware

> profile and select it during bootup of Windows.

>

>

>> 3) No errors in the log (neither of them),


>




Yes, the task would show up in the GUI. Right Clicking -> Run showed the

task running in Task Manage, but no interaction with the user/desktop.

Start - Run would work just fine for any program or task that I wanted to

run.



> Expected if the job never executes that is being monitored by Task

> Scheduler. So it looks like the task never does get executed. If you add

> the task using the GUI for Task Scheduler, do you see the job show up in

> that GUI? If so, right-click and select Run. Do you see that program's

> window now even if only for a short time if the program runs quickly?

> Does

> that program actually run without error? If it errors, like not even

> loading, then there won't be a window but you should see a log entry

> accounting for the failure. Will the program run from Start -> Run? If

> is

> is a console-mode program, open a command shell (cmd.exe) and run the

> command string to make sure what you think should run actually will run.

>

>> 4) Nothing shows up on the task bar - assuming a task runs. So for

>> example,

>> in the command script that I tried earlier, I have several observations:

>> a)

>> The task shows up in the GUI Task schedular (not at the command prompt

>> with

>> "AT") After the scheduled time, the event remains in the GUI display,


>




Thanks for this pointer, I wasn't aware of this.



> 'at' tasks do not automatically cleanup after themself even when scheduled

> to run just once. Even the jobs you define in the GUI for Task Scheduler

> will not disappear when scheduled to run only once. You have to enable

> the

> option "Delete the task if not scheduled to run again" to have it

> disappear

> after it ran its one time.

>




I made sure when using the 'AT' command to schedule in Military Time to the

msec: 15:30:00



> You say an 'at' defined job is showing up in the Task Scheduler's GUI. So

> it does look like it is getting defined. You say the job doesn't run at

> its

> scheduled time. Are you sure that you are using 24-hour military time

> when

> specifying the start time? There is no AM/PM paramter to the 'at' or

> 'schtask' programs. If you want the job to run at 5:17PM then you have to

> enter "17:17" for the time value. When using the GUI to Task Scheduler,

> you

> are shown times with AM/PM affixes to ensure you are picking the correct

> time, but 'at' and 'schtask' require 24-hour format. 'schtasks /create

> /?'

> at least warns you about that for its /ST parameter but help for 'at' is

> very terse.

>

>> 5) If I right-click the task and select run, nothing happens at all,


>

> Which leads me to believe that either you don't have permissions to run

> the

> program specified in the Run field or you have an invalid program filename

> or the parameters to that program are invalid.

>




Did this as well (I would have mentioned this, but I was trying not to

clutter up this post with what I thought to be elimentary steps and not

waste peoples time. But another good point.



> In the GUI for Task Scheduler, look at the properties for the job you say

> is

> there. Copy the Run field's value. Open a command shell (cmd.exe).

> Paste

> the command string to ensure you are running exactly the same entire

> command

> string (program and parameters). Don't hand copy the value of the Run

> field. Copy and paste so you have an exact copy of the entire string.

> Does

> it run from the command shell?

>

> If it doesn't run from the command shell, the problem isn't with Task

> Scheduler at all and simplifies to why you cannot run that command. It

> could be something as simply as you forgeting to enclose strings within

> double-quotes that contain spaces.

>

> C:\Program Files\Internet Explorer\iexplore.exe -nohome

>




Good point again. When doing something like this I would always use the 8.3

name: Progra~1\etc... Or enclose the strin gin double quotes as you note

below.



> is not a valid command string because of the spaces embedded in the path

> to

> the executable file (and the executable file could also have spaces).

> Parsing would end at "C:\Program" but no such file "Program" (with no

> extension, too) would be found under "C:\". The proper command would be:

>

> "C:\Program Files\Internet Explorer\iexplorer.exe" -nohome
 
Back
Top