?
Solved

Scheduling a task with the AT command

Posted on 2008-11-14
9
Medium Priority
?
238 Views
Last Modified: 2012-05-05
Is it possible to use the a AT command to schedule a task that will run daily and be visible to any user that is logged in?  The task also has to run if there is no user logged in.  
0
Comment
Question by:bosn1
  • 4
  • 3
  • 2
9 Comments
 
LVL 67

Expert Comment

by:sirbounty
ID: 22961056
run it under the system account...if you're using xp, you can use schtasks.

Example, to run internet explorer every day at noon:

schtasks /create /ru system /sc daily /st 12:00:00 /tn IE /tr "iexplore.exe"
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 22961062
Of course, IE wouldn't be visible by other users in that context - what sort of task are you looking at exposing to all users?
0
 

Author Comment

by:bosn1
ID: 22961395
I have to shutdown our desktops at night.  I have to provide the users with a 30 minute warning and an option to cancel.  I have everything built but cannot figure out how to schedule it to run under any user condition.
0
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 
LVL 67

Expert Comment

by:sirbounty
ID: 22961454
Have messenger enabled?

You could do something like

net send %computername% Computer shutting down in 30 minutes...

scheduled for 7:30, for example
and then have the shutdown command launch at 7:59 with a 60 second timer...I think shutdown is limited to 60 seconds max...

If you need it all in one batch file:
@echo off
net send %computername% Computer shutdown in 30 minutes.
ping 127.0.0.1 -n 1740
shutdown -s -t 60

Open in new window

0
 
LVL 21

Expert Comment

by:AmazingTech
ID: 22961556
If you're workstations are Windows XP perhaps tsshutdn will be your answer.

tsshutdn /?
Shut down a server in a controlled manner.

TSSHUTDN [wait_time] [/SERVER:servername] [/REBOOT] [/POWERDOWN]
         [/DELAY:logoffdelay] [/V]

  wait_time           Seconds to wait after user notification before
                      terminating all user sessions (default is 60).
  /SERVER:servername  The server to shut down (default is current).
  /REBOOT             Reboot the server after user sessions are terminated.
  /POWERDOWN          The server will prepare for powering off.
  /DELAY:logoffdelay  Seconds to wait after logging off all connected
                      sessions (default is 30).
  /V                  Display information about actions being performed.


at \\REMOTECOMPUTERNAME 1:00 /interactive tsshutdn 1800 /powerdown

2 boxes will appear. 1 DOS BOX which users can press Ctrl-C to cancel and a SYSTEM SHUTDOWN notification.

0
 

Author Comment

by:bosn1
ID: 22961863
I have a package built that provides the user with a 30 minute warning and the option to cancel the shutdown.  The warning has a countdown timer that shows  the user how time they have left and a cancel button.  If the user doesn't hit cancel the shuts down.  The package also logs the date/time, computer and user name.  If the user hit cancels the package adds "Shutdown canceled by (user name)" to the log file.  

I am stuggling with how to add the process as a scheduled task that will run under any user condition and be visible to any user that is logged in.
0
 
LVL 21

Accepted Solution

by:
AmazingTech earned 1000 total points
ID: 22962245
The /interactive switch shows your GUI to the User.

at \\REMOTECOMPUTERNAME 1:00 /interactive YOURPACKAGE.EXE
0
 
LVL 21

Expert Comment

by:AmazingTech
ID: 22962254
I use this with my packaged reboot timer. Works great.

Although I also added to my reboot timer if user is not logged in to reboot now instead of waiting the desired timeout.
0
 
LVL 21

Expert Comment

by:AmazingTech
ID: 22962269
My package resides on the server so if I needed to change it a can without having to revisit the workstations again.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

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…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…

749 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