How to assign one-time tasks from a CGI Perl application?

I am writing an application that allows users to schedule one-time, long-running tasks from a web application (Linux / Apache / CGI :: Application). For this, I use the Schedule :: At module, which is the Perl interface for the "at" command. Since the scheduled tasks do not repeat, I do not consider "cron". I have two problems with "at" though:

  • Scheduling works fine when a CGI application runs under the suexec shell, but not according to the schedule of the Apache process owner. How can I plan work in both environments (suexec and no-suexec)?
  • It seems that the processes scheduled by "at" or Schedule :: At do not have an error report, and I sometimes find that scheduled tasks fail. Is there a way to register the fact that the scheduled task (and not the scheduler itself) failed to start?

I am not fixed to "at" and open to using other, more reliable, planning methods, if any.

Thanks for attention.

+5
source share
1 answer

I heard good things about The Schwartz . He has no delay - yet; you should send jobs through, but this should solve both of the problems listed above, as long as your submit_job script is simple.

( , Gearman, , , " ", submit_job .)

+5

All Articles