Post #84,320
2/26/03 2:26:09 PM
|
How do I remotely execute a single command at a set time?
I want to run "defrag c: -f" on all the company PCs at 1:00am every night.
I want to do this without pulling my hair out.
What's the easiest FREE way to do this? I haven't found one yet...
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." -- Kristian Wilson, Nintendo, Inc, 1989
|
Post #84,325
2/26/03 2:44:09 PM
|
Different for each platform...specifics? Win2K?
Many fears are born of stupidity and ignorance - Which you should be feeding with rumour and generalisation. BOfH, 2002 "Episode" 10
|
Post #84,331
2/26/03 2:51:58 PM
|
Exact same.
All PCs are Windows XP Pro.
All have a C: drive
All have an account (<Domain>\\ws_service) that has Administrator rights on the PC.
I can use AD policies to do it, if somebody can point me in the right direction.
I'm almost to the point of doing it manually.
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." -- Kristian Wilson, Nintendo, Inc, 1989
|
Post #84,339
2/26/03 3:17:35 PM
|
Hmm... One would think this could be helpful:
Bung it in the Autoexec.bat or Startup folder or something. F:\\>at /?\nThe AT command schedules commands and programs to run on a computer at\na specified time and date. The Schedule service must be running to use\nthe AT command.\n\nAT [\\computername] [ [id] [/DELETE] | /DELETE [/YES]]\nAT [\\computername] time [/INTERACTIVE]\n [ /EVERY:date[,...] | /NEXT:date[,...]] "command"\n\n\\computername Specifies a remote computer. Commands are scheduled on the\n local computer if this parameter is omitted.\nid Is an identification number assigned to a scheduled\n command.\n/delete Cancels a scheduled command. If id is omitted, all the\n scheduled commands on the computer are canceled.\n/yes Used with cancel all jobs command when no further\n confirmation is desired.\ntime Specifies the time when command is to run.\n/interactive Allows the job to interact with the desktop of the user\n who is logged on at the time the job runs.\n/every:date[,...] Runs the command on each specified day(s) of the week or\n month. If date is omitted, the current day of the month\n is assumed.\n/next:date[,...] Runs the specified command on the next occurrence of the\n day (for example, next Thursday). If date is omitted, the\n current day of the month is assumed.\n"command" Is the Windows NT command, or batch program to be run.\n\n\nF:\\> HTH!
[link|mailto:MyUserId@MyISP.CountryCode|Christian R. Conrad] (I live in Finland, and my e-mail in-box is at the Saunalahti company.)
Your lies are of Microsoftian Scale and boring to boot. Your 'depression' may be the closest you ever come to recognizing truth: you have no 'inferiority complex', you are inferior - and something inside you recognizes this. - [link|http://z.iwethey.org/forums/render/content/show?contentid=71575|Ashton Brown]
|
Post #84,341
2/26/03 3:26:49 PM
|
Yeah, that would do okay...
Could put that in the login script, or something... Gotta test what happens on a ID collision...
Possibilities...
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." -- Kristian Wilson, Nintendo, Inc, 1989
|
Post #84,382
2/26/03 5:08:54 PM
2/26/03 5:14:40 PM
|
only use ID for delete
the ID is auto-assigned and only used to reference which entry to delete.
edit - added following:
found some notes from when I've used it in the past: started schedule service at 20:30 /every:m,t,w,th,f e:\\backup\\export.bat
this runs task in a window for debugging at 9:18 /I e:\\backup\\export.bat /k
If I recall correctly, if the /every option is not used then the task will drop off the scheduler list after it runs. Good for one-time tasks.
Darrell Spice, Jr.
[link|http://www.spiceware.org/|SpiceWare] - We don't do Windows, it's too much of a chore
Edited by SpiceWare
Feb. 26, 2003, 05:14:40 PM EST
|
Post #84,346
2/26/03 3:55:53 PM
|
Okay... stop with the <pre> lines....
...err, oops... I mean't...
Good work using <pre> there...
Just make sure you keep the Line length down... we have a few whinos... err whiners here on Windows on Laptops. With *SMALL* umm... screens... yeah *SCREENS* thats right... and *BLOATED* binaries...
And you'd think they prefer it! :D
b4k4^2
[link|mailto:curley95@attbi.com|greg] - Grand-Master Artist in IT | [link|http://www.iwethey.org/ed_curry/|REMEMBER ED CURRY!] [link|http://pascal.rockford.com:8888/SSK@kQMsmc74S0Tw3KHQiRQmDem0gAIPAgM/edcurry/1//|ED'S GHOST SPEAKS!] | [link|http://www.eweek.com/article2/0,3959,857673,00.asp|Writing on wall, Microsoft to develop apps for Linux by 2004] | Heimatland Geheime Staatspolizei reminds: These [link|http://www.whitehouse.gov/pcipb/cyberspace_strategy.pdf|Civilian General Orders], please memorize them. "Questions" will be asked at safety checkpoints. |
|