Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

CGI implementing Queue

Posted on 1997-11-14
2
183 Views
Last Modified: 2013-12-25
Hi,
I am fairly to perl scripting and I would appreciate some help.
I am looking for a way to implemet a perl 5 script in win95 enviroment that will act like cron in Unix. I need a script that will run every so often and do something. Is there any way to do it in win95?
The idea behind this is:
I need to set-up a queue system on a win32 based web server with perl 5.
The idea is this:

* Users send a form with a requset for a job to be executed.
* The submit button tells them that it will be done and add the request at the botton of a queue file.
* A perl 5 script that runs continusly checks every so often if the status of the equipment that will do the request is ok and if yes then it executes the job on the top of the queue file and delete it.

The main question is regarding the script that will periodicaly do the checking. How can this be implemented in perl in win95?

Also any better ideas than the file based queue?
0
Comment
Question by:dokimos
2 Comments
 
LVL 7

Accepted Solution

by:
faster earned 50 total points
ID: 1831174
You can simply use a loop and put a sleep() inside it.

For example:

while (1)  {
  ; your checking routine
  sleep(nSeconds);
}

You can arrange some condition under which the loop will exit.
0
 

Author Comment

by:dokimos
ID: 1831175
This is the method I though as well. I was really looking for anything more elaborate, possibly using less resourses, than a continous loop.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
This article will show, step by step, how to integrate R code into a R Sweave document
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question