Does "send in time" work on server?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 243
- Joined: Sun Dec 06, 2009 12:24 am
- Location: Fredericktown, MO
- Contact:
Does "send in time" work on server?
Good morning, everyone!
I am trying to implement a send-in-time command on the server, but it seems to be failing.
Is this supported?
Thanks,
Todd
I am trying to implement a send-in-time command on the server, but it seems to be failing.
Is this supported?
Thanks,
Todd
Re: Does "send in time" work on server?
Hi Todd,
The instance of the engine executing the script will run only as long as the original handler runs. When the handler stops, the message that was sent "in time" could run, but the programme quits before it actually catches that message. So, it is probably impossible to use send in time. I am not really an expert in server scripting with irev, because I always use PHP instead of irev. Perhaps someone else knows a way around this problem.
Kind regards,
Mark
The instance of the engine executing the script will run only as long as the original handler runs. When the handler stops, the message that was sent "in time" could run, but the programme quits before it actually catches that message. So, it is probably impossible to use send in time. I am not really an expert in server scripting with irev, because I always use PHP instead of irev. Perhaps someone else knows a way around this problem.
Kind regards,
Mark
Last edited by Mark on Mon Dec 05, 2011 12:40 pm, edited 1 time in total.
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Does "send in time" work on server?
I've tried.
No success.
No success.
-
- VIP Livecode Opensource Backer
- Posts: 9857
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Does "send in time" work on server?
"send <msg> in <time>" is problematic in pretty much all CGIs given the nature of that interface.
What problem are you trying to solve?
Would "wait" work?
What problem are you trying to solve?
Would "wait" work?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 243
- Joined: Sun Dec 06, 2009 12:24 am
- Location: Fredericktown, MO
- Contact:
Re: Does "send in time" work on server?
Richard:
Thanks!
"Wait" may work.
I am trying to figure out a workaround to Apple's Push Notification service for $$$ reasons...
The app posts to my .lc page, which is supposed to send an email via .php sendmail 45 minutes later, along with an answer dialog.
The .php sendmail is working correctly.
When I use "send in time" the .lc page breaks, but when I tried "wait" it works (at 15 seconds for testing), but the response back to the answer dialog is delayed 15 seconds, as well)...
Any ideas, or am I hopelessly lost?
Does wait 2700 seconds tie up the server inordinately? LOL!
:Todd
Thanks!
"Wait" may work.
I am trying to figure out a workaround to Apple's Push Notification service for $$$ reasons...
The app posts to my .lc page, which is supposed to send an email via .php sendmail 45 minutes later, along with an answer dialog.
The .php sendmail is working correctly.
When I use "send in time" the .lc page breaks, but when I tried "wait" it works (at 15 seconds for testing), but the response back to the answer dialog is delayed 15 seconds, as well)...
Any ideas, or am I hopelessly lost?
Does wait 2700 seconds tie up the server inordinately? LOL!
:Todd
Re: Does "send in time" work on server?
Hi Todd,
Kind regards,
Mark
Well, it does use resources. If you are going to have very many clients then I'd use a cron job that runs once a minute to check if there are any pending e-mails in the database that should be sent now and sends them if the right amount of time has passed.Does wait 2700 seconds tie up the server inordinately? LOL!
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
- VIP Livecode Opensource Backer
- Posts: 243
- Joined: Sun Dec 06, 2009 12:24 am
- Location: Fredericktown, MO
- Contact:
Re: Does "send in time" work on server?
Mark:
Would the cron job trigger a lc script?
:Todd
Would the cron job trigger a lc script?
:Todd
Re: Does "send in time" work on server?
Todd,
This should be possible. If it is possible to run a LC script from the command line, then it is also possible to use a cron job.
Best regards,
Mark
This should be possible. If it is possible to run a LC script from the command line, then it is also possible to use a cron job.
Best regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode