or whenever...
i found reboot, found system uptime. i am looking for absolute time - i.e. 12:00 AM, or w/e. is there a way to do that so i can set my machine to reboot at a certain time?
Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
reboot at midnight
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: reboot at midnight
you would need to use the schedulghost plugin. this will allow you to trigger an event at a specific time of day and from that event you can set the reboot into action..
I do want to make one note on this. EG will freeze the reboot if there is unsaved data. I am not sure but I also think that if you have open dialogs it will as well. the python script below will circumvent the halting of the reboot. the first 2 lines you can change to True or False, these are the lines that determine whether to save any data in an open dialog or to save tree data. You will want to place this into a Python Script action and put the action before the Reboot action. I have not tested this code but it should work. the only thing I may have to change is the use of CallAfter. i may need to use eg.AsTasklet instead.
I do want to make one note on this. EG will freeze the reboot if there is unsaved data. I am not sure but I also think that if you have open dialogs it will as well. the python script below will circumvent the halting of the reboot. the first 2 lines you can change to True or False, these are the lines that determine whether to save any data in an open dialog or to save tree data. You will want to place this into a Python Script action and put the action before the Reboot action. I have not tested this code but it should work. the only thing I may have to change is the use of CallAfter. i may need to use eg.AsTasklet instead.
Code: Select all
SAVE_TREE = False
SAVE_OPEN_DIALOGS = False
import wx
if eg.document.frame is not None:
for dialog in eg.document.frame.openDialogs[:]:
if SAVE_OPEN_DIALOGS:
try:
if dialog.panel.isDirty:
wx.CallAfter(dialog.DispatchEvent, wx.ID_OK)
except AttributeError:
pass
wx.CallAfter(dialog.Destroy)
if eg.document.isDirty:
if SAVE_TREE:
eg.document.Save()
else:
eg.document.isDirty = False
Re: reboot at midnight
oy, not sure what happened but i was testing reboot and after my pc came back up i am getting this on all Webserver sent to another EG events. they were all saved. i cannot seem to see anything that is not configured right. any ideas?
Error in Action: "Webserver: Send event to another EventGhost: ST.Kitchen Motion Sensor.motion.inactive"
Traceback (most recent call last) (0.5.0-rc4):
File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionBase.py", line 116, in CallWrapper
return self(*args)
File "C:\Program Files (x86)\EventGhost\plugins\Webserver\__init__.py", line 4141, in __call__
Request("TriggerEnduringEvent", event)
File "C:\Program Files (x86)\EventGhost\plugins\Webserver\__init__.py", line 4127, in Request
sock.send("\r\n".join(data))
AttributeError: 'NoneType' object has no attribute 'send'
Error in Action: "Webserver: Send event to another EventGhost: ST.Kitchen Motion Sensor.motion.inactive"
Traceback (most recent call last) (0.5.0-rc4):
File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionBase.py", line 116, in CallWrapper
return self(*args)
File "C:\Program Files (x86)\EventGhost\plugins\Webserver\__init__.py", line 4141, in __call__
Request("TriggerEnduringEvent", event)
File "C:\Program Files (x86)\EventGhost\plugins\Webserver\__init__.py", line 4127, in Request
sock.send("\r\n".join(data))
AttributeError: 'NoneType' object has no attribute 'send'
Re: reboot at midnight
nevermind... a second reboot fixed it. not sure what happened
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: reboot at midnight
don't know... glad ya solved it tho.
Re: reboot at midnight
issue still occurring even after a reboot. any idea on what may be happening? anyway to figure it out?kgschlosser wrote:don't know... glad ya solved it tho.
Send Event ST.Kitchen Motion Sensor.motion.active
Webserver: Send event to another EventGhost: ST.Kitchen Motion Sensor.motion.active
Error in Action: "Webserver: Send event to another EventGhost: ST.Kitchen Motion Sensor.motion.active"
Traceback (most recent call last) (0.5.0-rc4):
File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionBase.py", line 116, in CallWrapper
return self(*args)
File "C:\Program Files (x86)\EventGhost\plugins\Webserver\__init__.py", line 4141, in __call__
Request("TriggerEnduringEvent", event)
File "C:\Program Files (x86)\EventGhost\plugins\Webserver\__init__.py", line 4127, in Request
sock.send("\r\n".join(data))
AttributeError: 'NoneType' object has no attribute 'send'
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: reboot at midnight
I would post this question in the Webserver support thread under the plugins thread.
It seems as tho there is something wrong with the creation of the socket.
It seems as tho there is something wrong with the creation of the socket.
