Achilles Posted March 19, 2008 Share Posted March 19, 2008 I know I've seen this somewhere but I'm not sure where and can't find it in my brief search. Basically I want this script to run every hour or so and check for something. I know I could do this in a script but I would rather just have the process run every hour and then exit instead of constantly running. Achilles My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
smashly Posted March 19, 2008 Share Posted March 19, 2008 HiYou can use AT commands from cmdline to schedule/remove tasks in windowsSome basic info HereCheers Link to comment Share on other sites More sharing options...
Achilles Posted March 19, 2008 Author Share Posted March 19, 2008 (edited) I got this: Run("at 22:08 run C:\asdf.exe")Which isn't working. I looked at the CMD at is says that it is scheduled to "run C:\asdf.exe" but it gets an error and assigns it to the next day. I only want this to be assigned once, and I'm not sure why it's assigning it to the next day. I'm also not sure why it doesn't work. asdf.exe, which is in the right directory is simply a compiled autoit script that shows a message box. Edited March 19, 2008 by Achilles My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
smashly Posted March 19, 2008 Share Posted March 19, 2008 (edited) To set it to fire on an hour just one day or multiple days...More info HereCheersexamples:this would run on Mondays, Tuesdays and Fridays @ 10:05pmRun('at 22:05 /every:M,W,F "c:\adsf.exe"')Task Scheduler service needs to be running to add tasks via the AT commands.. Edited March 19, 2008 by smashly Link to comment Share on other sites More sharing options...
Achilles Posted March 19, 2008 Author Share Posted March 19, 2008 (edited) Ok, so to get the basics down I tried using the wizard for adding tasks. But it's giving me this error message: The new task has been created, but may not run because the account information could not be set. The specific error is: 0x80070005: Access is denied. Try using the Task page Browse button to locate the application.This might explain why none of my scheduled tasks are being run... For example, I tried manually adding this from the CMD: at 22:23 C:\windows\notpad.exeBut it didn't do anything. Is that formatted right? Edited March 19, 2008 by Achilles My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
smashly Posted March 19, 2008 Share Posted March 19, 2008 Look up at my edited post .. Task Scheduler service needs to be running.. is it? Link to comment Share on other sites More sharing options...
Achilles Posted March 19, 2008 Author Share Posted March 19, 2008 Look up at my edited post .. Task Scheduler service needs to be running.. is it?Yes, it's running. Ok, I'm getting some results now... rather odd ones though.I set a task for 22:30 to run asdf.exe (which is Msgbox(0, '', '') compiled to an exe)... At 22:30 the sound of a message box was made but no message box showed up. Any ideas why? My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
FreeFry Posted March 19, 2008 Share Posted March 19, 2008 You need the /interactive parameter in the at command, otherwise, it wont be 'interactive'. Link to comment Share on other sites More sharing options...
smashly Posted March 19, 2008 Share Posted March 19, 2008 Try Run('at 14:06:00 /interactive /every:W notepad.exe') set the time/day/app to suit yourself of coarse. Cheers Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now