FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Queuing at job from within php program?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Queuing at job from within php program? [message #175687 is a reply to message #175678] Thu, 20 October 2011 01:40 Go to previous messageGo to previous message
bobmct is currently offline  bobmct
Messages: 16
Registered: September 2010
Karma:
Junior Member
On Tue, 18 Oct 2011 10:12:13 +0200, Erwin Moller
<Since_humans_read_this_I_am_spammed_too_much(at)spamyourself(dot)com> wrote:

> On 10/17/2011 3:24 PM, bobm3(at)worthless(dot)info wrote:
>> Fellow php'ers;
>>
>> I'm having some difficulty getting this to work: Based on a date/time
>> selected by a user on a web form I would like to use the "at" command to
>> schedule that task.
>>
>> I've tried various php functions (system, exec, passthru) with the same
>> results (return code 1 - which I cannot seem to get the error message
>> from).
>>
>
> <snip>
>
> Others commented on the issues that can arrise with rights.
> (More specific: the PHP-user (www-data or apache) adding tasks.)
>
> I want to add another approach that I prefer.
> (Written for Unix-lie systems. Replace cronjob with task-scheduler for
> Windows.)
>
> Personally I don't like my software to schedule new tasks automatically.
> So if I need scheduling, I prefer to create 1 cronjob by hand, for
> www-data, that runs a script (can be PHP).
> That script than pulls from a database certain tasks WHEN they are needed.
> Depending on the time-resolution you need you can run this cron-job once
> a day, once an hour, every minute, etc.
>
> I like it that way because I can catch the result, log the last time it
> ran, etc. And e-mail myself or some admin in case of failure.
>
> Just a thought. Maybe it helps in your situation.
> If not, consider this noise. ;-)
>
> Regards,
> Erwin Moller

Thanks all for the great comments. I haven't looked at the at.deny
file yet but I will. Regarding the suggestion about storing the
request and triggering at defined intervals: that's my direction. But
seeing how I'm replacing a manual system now I need something to queue
these requests short-term while I find time to complete the back end.

Thanks again - Bob
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: declaring private variable in class
Next Topic: simple session question
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Sep 19 22:30:59 GMT 2024

Total time taken to generate the page: 0.05256 seconds