Sign in to follow this  
Followers 0
hallaplay835

Executing an .au3 script with the machine turned off

16 posts in this topic

#1 ·  Posted (edited)

Hello there,

I know this may sound stupid and practically impossible but I was wondering whether you could execute an .au3 script with the acutal PC not turned on. Let me explain.

I need to execute a script during the night (22hrs - 09hrs) but I want to do it with the machine turned off due to power consumption and electricity bills. Of course, as we all know, this is impossible.

However, I was wondering whether there is some sort of free service out there that allows you to host your scripts or even your .exe files and you could tell the service 'please run this script until 09 AM for me' etc.

In essence, what I am searching for is a hosting service, someone who will execute my scripts on their machines without me having to have the PC on all night.

If you know some alternatives that could serve as an approach to solve this please post them. Inform me as well if you are completely sure that there is no way this can be solved.

Again, thanks for the support.

Edited by hallaplay835

_____________________________________________________[size="2"][font="Arial"]"Pain is temporary, glory is forever."[/font][/size]

Share this post


Link to post
Share on other sites



There is a feature called Wake On Lan, but you need another computer that is powered up to trigger the wake up call.

How about setting you computer to go into sleep mode until the task is run (from what I read, computers will wake out of sleep mode). Then after the task is done, make your script shut down the computer.


#include <ByteMe.au3>

Share this post


Link to post
Share on other sites

There is a feature called Wake On Lan, but you need another computer that is powered up to trigger the wake up call.

How about setting you computer to go into sleep mode until the task is run (from what I read, computers will wake out of sleep mode). Then after the task is done, make your script shut down the computer.

Not Wake On Lan what I am searching for :huh2:

However, would a computer continue executing the script on hibernate mode? That would reduce power consumption; I would be happy to do that.

Nevertheless, what I am searching for is a web hosting service... do you know about any?

Thanks.


_____________________________________________________[size="2"][font="Arial"]"Pain is temporary, glory is forever."[/font][/size]

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

What does your Script do? As perhaps a solution could be found.

Edited by guinness

_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

What does your Script do? As perhaps a solution could be found.

I cannot explain it fully in a simple way but in essence what it does is it looks in a webpage for certain information every 5 minutes. It obtains the HTML markup, stores some tables in arrays and sends a few forms. Then it waits again for 5 minutes and so...

It does not matter what the script does; what I am looking for is a web service that lets you store the scripts or .exe files so that I can execute the script, power off my machine whilst the server executes the script all night and then come back in the morning and tell the server to stop executing. Is there something similar or am I just speaking nonsense?

Anyone knows whether the PC can execute a script whilst being in hibernate mode? I have tried in Blocked mode and it works but in hibernate mode it does not seem to work.


_____________________________________________________[size="2"][font="Arial"]"Pain is temporary, glory is forever."[/font][/size]

Share this post


Link to post
Share on other sites

In Hibernate, the computer is actually shut off. It saves the state of everything in memory to a file on the hard drive, and then when you turn it back on it reads that file back into memory so that your computer is back to the state it was prior to hibernating. There's no way to run anything while it's hibernated.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

tip: u can turn on or off your computer pre-set times in BIOS or windows itself(u need a ATX powersuply)The only way to do this is if the capability exists within the CMOS of that particular motherboard. Access the CMOS and look in the power management section.....

Edited by FMS

as finishing touch god created the dutch

Share this post


Link to post
Share on other sites

You can set a scheduled task to wake your pc from hybernate (I use this option to wake my pc every morning mon-fri and 8am) and in this scheduled task you can have it run your script.


010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites

I cannot explain it fully in a simple way but in essence what it does is it looks in a webpage for certain information every 5 minutes. It obtains the HTML markup, stores some tables in arrays and sends a few forms. Then it waits again for 5 minutes and so...

Even without knowing all the details here, this sounds like something that could be done with a server-side scripting language, like PHP or Ruby or Python or Perl.., maybe even a shell script, depending in the host. One of the toughest things with this though would be finding a free host that supports any kind of server side scripting.. Shared hosting can be found pretty cheap, like 10 bucks or less a month..


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

I know this could be done with server-side scripting languages like ASP.NET or PHP but I know very little about these and translating the whole of the script would be very tedious. Nevertheless, I am going to start learning PHP in-depth in order to see if I can translate the script.

Thanks somdcomputerguy.

Even without knowing all the details here, this sounds like something that could be done with a server-side scripting language, like PHP or Ruby or Python or Perl.., maybe even a shell script, depending in the host. One of the toughest things with this though would be finding a free host that supports any kind of server side scripting.. Shared hosting can be found pretty cheap, like 10 bucks or less a month..


_____________________________________________________[size="2"][font="Arial"]"Pain is temporary, glory is forever."[/font][/size]

Share this post


Link to post
Share on other sites

The thing is the script is running ALL night so this is not a solution.

You can set a scheduled task to wake your pc from hybernate (I use this option to wake my pc every morning mon-fri and 8am) and in this scheduled task you can have it run your script.


_____________________________________________________[size="2"][font="Arial"]"Pain is temporary, glory is forever."[/font][/size]

Share this post


Link to post
Share on other sites

A question I have is, how much would you spend to have a service host a script to run for you, compared to how much your electricity bill would be for the same time period if you left the machine running? Cost benefit analysis might tell you that getting a really low power cheap crappy computer to run the script might be cheaper in the long run than spending the money to have it hosted.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

Quite a while back, I used to have a BBS running 24/7. The PC was a 286 with a 40 meg HD and a 150 watt power supply. With the CRT monitor turned off most of the time, and an external 2400 baud modem powered on 24/7, my electric bill went up about 12-13 bucks a month IIRC. I don't know if this will have any point to the OP, but it does bring back some memories, thanks BrewManNH! :huh2:


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

This sounds like something you could do with curl in either a shell script or a php script for a lot cheaper than with a vps... To run an exe you are looking at paying for a windows vps... not very practical to run a single application with the little amount of bandwith consumption that would generate...

You can get a hosting plan for $1/mo... I've yet to find a vps for under $50/mo that isn't an introductory price. You just need to make sure the host has curl support with their php... It shouldn't take much to reproduce the functionality you mentioned in your script...

Share this post


Link to post
Share on other sites

If you go to Hostrail.com they offer Windows VPS

I had one from there, pretty cheap but they're overused.

Not too sure but I think that they have stopped Windows VPS.

If you still want one, go on LowEndBox. That's how I found them out.


My ickle pieces of software :3Radio Scriptr //Almost completeSimple IP/URL pinger, my first program. //CompletedSimple Downloader // Working - basic stateOn-GoingRadio Scriptr - Radio Server.

Share this post


Link to post
Share on other sites

This sounds like something you could do with curl in either a shell script or a php script for a lot cheaper than with a vps... To run an exe you are looking at paying for a windows vps... not very practical to run a single application with the little amount of bandwith consumption that would generate...

You can get a hosting plan for $1/mo... I've yet to find a vps for under $50/mo that isn't an introductory price. You just need to make sure the host has curl support with their php... It shouldn't take much to reproduce the functionality you mentioned in your script...

Probably you are right. I could do this using PHP but I do not know to code in this language and also translating the whole script to this server-side programming language would be VERY tedious, the script is almost 1500 lines long. I know nothing about curl, never heard of it before but I have looked at the web site and it is not a plausible solution, I do not know why you have posted that; could you explain how curl would be useful?

I think I am going to find a VPS even though I am going to pay 10 bucks a month for 1GB RAM 25GB HDD when I will be actually using 50MB RAM 5KB HDD. Maybe I can find a VPS for free? Or a hosting company which offers trial VPS to see if it suits me? To be sincere, I do not know what I am going to do about it.


_____________________________________________________[size="2"][font="Arial"]"Pain is temporary, glory is forever."[/font][/size]

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0