Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Run a scheduled task in the foreground

Posted on 2004-04-26
9
Medium Priority
?
5,455 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

We have adopted the strategy to use Computers in Student Labs as the bulletin boards. The same target can be achieved by using a Login Notice feature in Group policy but it’s not as attractive as graphical wallpapers with message which grabs the att…
Sometimes people don't understand why download speed shows differently for Windows than Linux.Specially, this article covers and shows the solution for throughput difference for Windows than a Linux machine. For this, I arranged a test scenario.I…
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…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

610 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