Page 1 of 1

Does "send in time" work on server?

Posted: Mon Dec 05, 2011 11:37 am
by ctflatt
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

Re: Does "send in time" work on server?

Posted: Mon Dec 05, 2011 11:50 am
by Mark
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

Re: Does "send in time" work on server?

Posted: Mon Dec 05, 2011 12:33 pm
by bangkok
I've tried.

No success.

Re: Does "send in time" work on server?

Posted: Mon Dec 05, 2011 2:48 pm
by FourthWorld
"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?

Re: Does "send in time" work on server?

Posted: Mon Dec 05, 2011 7:38 pm
by ctflatt
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

Re: Does "send in time" work on server?

Posted: Mon Dec 05, 2011 7:58 pm
by Mark
Hi Todd,
Does wait 2700 seconds tie up the server inordinately? LOL!
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.

Kind regards,

Mark

Re: Does "send in time" work on server?

Posted: Mon Dec 05, 2011 8:09 pm
by ctflatt
Mark:

Would the cron job trigger a lc script?

:Todd

Re: Does "send in time" work on server?

Posted: Mon Dec 05, 2011 8:16 pm
by Mark
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