strange problems with SEND

Bob Sneidar bobsneidar at iotecdigital.com
Fri Jan 17 11:21:41 EST 2020


This got me thinking, I've pondered a way to run scheduled tasks, and how I would go about it. I think what I would do is have a faceless standalone that once launched sent a command in time every second, or 5 seconds or whatever, and the handler would then check a list or a database for tasks whose datetime was prior to the current time, and were flagged pending. 

I would then probably through socket communication attempt to trigger the task to my actual application, and if successful mark the task as completed. If the socket comm failed, I would simply do nothing and issue another send in time. 

The advantage of using a dedicated app is that multiple applications could take advantage of it. A new app could simply register with the timer app again through sockets, and each task would store the name of the registered app in the task, so each app would only get it's own tasks. 

Probably more than what you want to do though. At the very least you could implement this in app. 

Bob S


> On Jan 17, 2020, at 08:11 , Klaus major-k via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Hi all,
> 
>> Am 17.01.2020 um 16:58 schrieb Klaus major-k via use-livecode <use-livecode at lists.runrev.com>:
>> 
>> Just tested this in LC 5.02 and it worked as exspected!
>> The pendingmessages show 1579330812.096689 as "delivery" time
>> which resolves nicely to -> Saturday, January 18, 2020
>> 
>> Tested also in LC 9.05 and it works as exspected, too!?
>> 
>> A new bug? :-/
> 
> maybe this has to do with "centurycutoff"?
> But then this problem should also be in LC 5.02 and 9.05, right?
> 
>>> Am 17.01.2020 um 16:46 schrieb Klaus major-k via use-livecode <use-livecode at lists.runrev.com>:
>>> 
>>> HI all,
>>> 
>>> I want to execute a handler in the future -> tomorrow at 8:00 AM
>>> So I scripted:
>>> ...
>>> put the date into tDatum
>>> convert tDatum from date to dateitems
>>> add 1 to item 3 of tDatum
>>> put 8 into item 4 of tDatum
>>> 
>>> ## dateitems:
>>> # 1. the year
>>> # 2. the month number
>>> # 3. the day of the month
>>> # 4. the hour in 24-hour time
>>> # 5. the minute
>>> # 6. the second
>>> # 7. the numeric day of the week where Sunday is day 1, Monday is day 2, and so forth 
>>> 
>>> convert tDatum from dateitems to seconds
>>> put tDatum - the seconds into tNeuesDatum
>>> send "checkabfrage" to me in tNeuesDatum secs
>>> put the result into checkabfrage_id   
>>> ...
>>> Looks OK in the debugger, tNeuesdatum is something like 58000, which is correct.
>>> 
>>> However, when I query "the pendingmessages" this message shows up as:
>>> 39440,3158550744.943945,onlinekursinfo,stack "/xxx.livecode"
>>> 
>>> But 3158550744.943945 as "delivery" time resolves (convert) to: 
>>> long system date -> Sonntag, 2. Februar 2070
>>> long date -> Sunday, february 2, 2070?
>>> date -> 2/2/70
>>> 
>>> Is this broken somehow or am I missing something?
>>> Any insight appreciated!
>>> 
>>> 
>>> Best
>>> 
>>> Klaus
>>> --
>>> Klaus Major
>>> https://www.major-k.de
>>> klaus at major-k.de
>>> 
>>> 
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> --
>> Klaus Major
>> https://www.major-k.de
>> klaus at major-k.de
>> 
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> --
> Klaus Major
> https://www.major-k.de
> klaus at major-k.de
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list