?
Solved

Run a scheduled task in the foreground

Posted on 2004-04-26
9
Medium Priority
?
5,334 Views
Last Modified: 2008-12-23
Need to do it regardless of who is logged on to the system - the scheduled task consist of nothing more than a 1line vbscript to pop a message box stating that the library will be closing in 10 minutes - an administrative login will be used to create the task but it needs to pop the message interactively.
0
Comment
Question by:baal32
[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
  • 4
  • 4
9 Comments
 
LVL 67

Expert Comment

by:sirbounty
ID: 10922367
Log in as the admin
Click Start->Run->CMD

AT 16:50 /every:m,t,w,th,f net send %computername% "The library will be closing in 10 minutes." <enter>

You can adjust the time and day(s) if needed - this is just for each weekday at 4:50pm
0
 

Author Comment

by:baal32
ID: 10922514
I appreciate the quick response but I'd really like to be able to have a vbscript run in the foreground (net send is very limited)
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 10922526
Just replace "net send ...." with the name of your script - make sure the script is stored in a folder that all users have access to...
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:baal32
ID: 10922723
The problem is when another user is logged in (other than the administrator who created the task) the vbscript runs in the background and suppresses console out put - if the same user is logged in as created the script, the vbscript runs normally and a msgbox appears but otherwise nothing happens (although if I check taskman I can see the wscript process running because the user is unable to see the msgbox and therefore click OK)
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 10922745
Hmm - I might have to write a small script to test it - but can you schedule it with
Start /Max yourscript.vbs
0
 

Author Comment

by:baal32
ID: 10942094
Still haven't managed to get this to work - I think the scheduled task service runs the task in the background if the current user != creating user.  This is probably by design but I'm trying to circumvent it.  I coudl perform various unattractive workarounds like having the system remotely message itself but...
0
 

Accepted Solution

by:
baal32 earned 0 total points
ID: 10943172
Well...  I guess its kind of funny in a 'wasted 6 hours of my time' kind of way.  So AT, despite lacking all of the 'cool new improvements' added to the GUI task scheduler, has a very important /interactive switch which allows the process to run in the foreground.

So...  Finally figured it out
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 10943276
baal32 - sorry I've been tied up today.
Glad you got it working though...I completely forgot about that switch!  :D
I'll take care of refunding this one for you...
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Migration of Exchange mailbox can be done with the ExProfre.exe tool. But at times, when the ExProfre.exe tool migrates the Exchange Server user profile, it results in numerous synchronization problems. Synchronization error messages appear in the e…
Issue: Unstable cursor in Windows XP and Windows runs extremely slow in that any click will bring up the Hour glass (sometimes for several seconds before giving you what you want) . Troubleshooting Process and the FINAL FIX: This issue see…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

762 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