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.

execute command on monday 12:00

If you have a question or need help, this is the place to be.
Post Reply
XkFnHLgSVDl7
Posts: 22
Joined: Wed Mar 28, 2007 12:10 pm

execute command on monday 12:00

Post by XkFnHLgSVDl7 »

Hi,
I'm looking for a way to execute a command on a certain day of the week (like monday) at a given time (like 12:00). The later is easy using the timer plugin, but how do I get the day of the week? Is there a Python script that could do the job?
Bartman
Plugin Developer
Posts: 881
Joined: Sun Feb 12, 2006 9:03 am

Re: execute command on monday 12:00

Post by Bartman »

Trigger an event on every day on 12:00 and try this script

Code: Select all

import time
eg.result = time.localtime()[6] == 0
After the script add a conditional jump to do what you want to do on a monday. Change the last number to check for another day of the week.
XkFnHLgSVDl7
Posts: 22
Joined: Wed Mar 28, 2007 12:10 pm

Re: execute command on monday 12:00

Post by XkFnHLgSVDl7 »

thanks, that did the job :)
Post Reply