Scheduling a task with the AT command

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.  
bosn1Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sirbountyCommented:
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
sirbountyCommented:
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
bosn1Author Commented:
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
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

sirbountyCommented:
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
AmazingTechCommented:
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
bosn1Author Commented:
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
AmazingTechCommented:
The /interactive switch shows your GUI to the User.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AmazingTechCommented:
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
AmazingTechCommented:
My package resides on the server so if I needed to change it a can without having to revisit the workstations again.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Legacy OS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.