gertsolo Posted January 10, 2012 Share Posted January 10, 2012 Hey, I haven't had too much time searching the forum so if someone could point me out in the right direction, that would be great. For a website I want to upload stuff, but I want to do it at night when the costs and loads are lower. basicly I want to do these things at certain times (when I am asleep ;-) Something like : at 23:00 do 'some actions' is this possible? I'm even looking into the possibility to autostart my computer just before the point the actions have to be done (if that is possible ?) thx & grtz The more you learn, the less you know. Link to comment Share on other sites More sharing options...
Beege Posted January 10, 2012 Share Posted January 10, 2012 Can you upload using ftp? Assembly Code: fasmg . fasm . BmpSearch . Au3 Syntax Highlighter . Bounce Multithreading Example . IDispatchASMUDFs: Explorer Frame . ITaskBarList . Scrolling Line Graph . Tray Icon Bar Graph . Explorer Listview . Wiimote . WinSnap . Flicker Free Labels . iTunesPrograms: Ftp Explorer . Snipster . Network Meter . Resistance Calculator Link to comment Share on other sites More sharing options...
gertsolo Posted January 10, 2012 Author Share Posted January 10, 2012 Can you upload using ftp? Yes, but is not just uploading. There are also other things I want to execute before the uploads. The more you learn, the less you know. Link to comment Share on other sites More sharing options...
TheGeneral Posted January 10, 2012 Share Posted January 10, 2012 (edited) You can schedule the execution of your app with Task Scheduler. If that's not enough you can get the hour with Date functions and keep checking until a function has to be run. About autostarting your PC, you should look at the motherboard BIOS and its manual. Edited January 10, 2012 by TheGeneral Link to comment Share on other sites More sharing options...
gertsolo Posted January 10, 2012 Author Share Posted January 10, 2012 (edited) If that's not enough you can get the hour with Date functions and keep checking until a function has to be run. that was my first idea, but I hoped there was a function for that, too bad... Anyway I now do it like this: While 1 $time = @hour & ":" & @MIN & ":" & @SEC consolewrite ($time & @CR) if $time = "16:17:00" Then MsgBox(4096, "time", $time) EndIf if $time = "16:17:05" Then MsgBox(4096, "time", $time) EndIf WEnd Problem with this is that I get several matches for that time. I mean that the while cycle goes faster that 1 second and thus the actions are performed several times. How can I prevent that and do just the action once? I put in a sleep, but that's a bit dirty written, no? Edited January 10, 2012 by gertsolo The more you learn, the less you know. Link to comment Share on other sites More sharing options...
Dana Posted January 10, 2012 Share Posted January 10, 2012 First, you should put in a sleep, so the while 1 loop doesn't eat all your CPU cycles. But if you put in, say, sleep(1000), then you might miss the time. A better approach would be to use "greater than" instead of "equal" for the time comparison, and set a variable indicating that it's done, so it doesn't repeat. 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