From: jim h. <hoo...@us...> - 2008-11-22 02:15:59
|
Hi How can I code an event to execute at 2:00 am on tue and fri?? if ((Day = tue) and ($time_now(2:00 AM)) or (Day = fri) and (time_now(2:00 AM))) { I am sure there is a system variable for this but I don't know what it is. Thanks Jim -- Be Yourself @ mail.com! Choose From 200+ Email Addresses Get a Free Account at www.mail.com |
From: Dave S. <da...@st...> - 2008-11-22 03:17:06
|
I have had great success using $time_cron -Dave jim hood wrote: > Hi > > How can I code an event to execute at 2:00 am on tue and fri?? > > if ((Day = tue) and ($time_now(2:00 AM)) or (Day = fri) and > (time_now(2:00 AM))) { > > I am sure there is a system variable for this but I don't know what > it is. > > Thanks > Jim |
From: jamby <hoo...@us...> - 2008-11-22 05:20:53
|
Thanks Dave I had tried that one once before, but now I see I had the format WronG s/b if ( time_cron ' 00 02 * * 1 ') { that would be 2:00 am on monday. I didn't have the space between the 2 * hence an error. Next Question How do I get an event to trigger 15 minutes plus from a restart??? if ("$time_startup_time + 15") { doesn't do it. Thanks Jim Jim Dave Stenhouse-2 wrote: > > I have had great success using $time_cron > -Dave > > jim hood wrote: >> Hi >> >> How can I code an event to execute at 2:00 am on tue and fri?? >> >> if ((Day = tue) and ($time_now(2:00 AM)) or (Day = fri) and >> (time_now(2:00 AM))) { >> >> I am sure there is a system variable for this but I don't know what >> it is. >> >> Thanks >> Jim > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the > world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > ________________________________________________________ > To unsubscribe from this list, go to: > http://sourceforge.net/mail/?group_id=1365 > > > -- View this message in context: http://www.nabble.com/coding-a-time-of-week-event-tp20632702p20633632.html Sent from the Misterhouse - User mailing list archive at Nabble.com. |
From: jamby <hoo...@us...> - 2008-11-22 16:29:53
|
>Mark wrote: >Try this: if ( time_now( "$Time_Startup_time + 00:15" ) ) { ... >What you have just evaluates whether the string "$time_startup_time + 15" >is empty (which it never is). You want to "ask" whether the current time >is a particular time, which is what time_now() does for you. Lastly, your >offset means 15 hours, not 15 minutes. >Mark >P.S. Also note capitalization in the variable name $Time_Startup_time Mark I tried this if ( time_now( "$Time_Startup_time + 00:15" )) { and I get these errors in the startup.log Bad time format: 1227370598 + 00:15 caller=main /mister/mh/bin/mh 6274 db mday=22 mdayf=22 min=17 minf=0 secf=0 hour=8 hourf=1227370598 ap= m=11 mf=10 y=2008 yf=108 Bad time_now format: 1227370598 + 00:15 caller=main (eval 380) 2857 Not sure but it looks like the time formats are different.. Thanks Jim -- View this message in context: http://www.nabble.com/coding-a-time-of-week-event-tp20632702p20637946.html Sent from the Misterhouse - User mailing list archive at Nabble.com. |
From: jamby <hoo...@us...> - 2008-11-22 18:37:59
|
>I think you want to check against $Time_Startup, which will be in a >proper time_now format. Brian Yes that got it. if (time_now("$Time_Startup + 00:15")) { ## works fine Is there somewhere that these variables are defined in a list? I've read most of the doc's and grep'd the examples and bin files. While I find references to the variables, I don't always understand there use. Thanks to all Jim -- View this message in context: http://www.nabble.com/coding-a-time-of-week-event-tp20632702p20639292.html Sent from the Misterhouse - User mailing list archive at Nabble.com. |
From: Brian W. <bri...@78...> - 2008-11-22 21:15:24
|
jamby wrote: > >> I think you want to check against $Time_Startup, which will be in a >> proper time_now format. > > Brian > Yes that got it. > if (time_now("$Time_Startup + 00:15")) { ## works fine > > Is there somewhere that these variables are defined in a list? > I've read most of the doc's and grep'd the examples and bin files. > While I find references to the variables, I don't always understand there > use. I find the 'Global vars' screen, in the ia5 interface, useful. MrHouse Home -> Browse Widgets Another good source for how the mh internals work: http://misterhouse.sourceforge.net/mh.html#list_of_functions hth, Brian |
From: Timothy S. <spa...@ic...> - 2008-11-22 05:38:42
|
I am pretty sure you can do something like this: If (time_cron(* 2 2,4 * *)) { } ________________________________ From: jim hood [mailto:hoo...@us...] Sent: Friday, November 21, 2008 9:16 PM To: mis...@li... Subject: [mh] coding a time of week event Hi How can I code an event to execute at 2:00 am on tue and fri?? if ((Day = tue) and ($time_now(2:00 AM)) or (Day = fri) and (time_now(2:00 AM))) { I am sure there is a system variable for this but I don't know what it is. Thanks Jim -- Be Yourself @ mail.com! Choose From 200+ Email Addresses Get a Free Account at www.mail.com<http://www.mail.com/Product.aspx>! |
From: Mark E. P. <me...@si...> - 2008-11-22 11:26:22
|
On 2008/11/22 00:20, jamby wrote: > Next Question > How do I get an event to trigger 15 minutes plus from a restart??? > if ("$time_startup_time + 15") { > doesn't do it. Try this: if ( time_now( "$Time_Startup_time + 00:15" ) ) { ... What you have just evaluates whether the string "$time_startup_time + 15" is empty (which it never is). You want to "ask" whether the current time is a particular time, which is what time_now() does for you. Lastly, your offset means 15 hours, not 15 minutes. Mark P.S. Also note capitalization in the variable name $Time_Startup_time |
From: Brian W. <bri...@78...> - 2008-11-22 16:49:47
|
> I tried this > if ( time_now( "$Time_Startup_time + 00:15" )) { > > and I get these errors in the startup.log > Bad time format: 1227370598 + 00:15 caller=main /mister/mh/bin/mh 6274 > db mday=22 mdayf=22 min=17 minf=0 secf=0 hour=8 hourf=1227370598 ap= m=11 > mf=10 y=2008 yf=108 > Bad time_now format: 1227370598 + 00:15 caller=main (eval 380) 2857 > > Not sure but it looks like the time formats are different.. > I think you want to check against $Time_Startup, which will be in a proper time_now format. |