Re: "Pseudo" cron job



Shelly wrote:
I am coding a psudo-cron job into an application that I am writing. I don't have access to write a real cron job.

Here is what I did:
1 - I downloaded pseudocron.php from its website (www.bitfolge.de/pseudocron)
2 - I created a cronjob directory and put a crontab.txt in there and had the pseudocron.php hook up with it by properly configuring the section in that script.
3 - I put an require_once("pseudocron.php") in my login screen so that when the user logs in the script is run.
4 - The cronjob runs setRemind.php. All that does is set a session variable, $_SESSION['remind'] to true.
5 - In my template file, which is on every page in the application, I test on whether that variable is true or false. If it is false, I write <body>. If it is true, I write <body onload="window.open("checkRemind.php")>
6 - The checkRemind.php accesses the database and sees if there are any reminders to show the user. It also sets the session variable to false.

The crontab.txt has a line:
*/1 * * * Sun cronjobs/setRemind.php # repeat every one minute

OK, other than the timer firing things, all works well. Initially, it opens the reminder screen in a separate window and does what it should. After that, changing pages does not invoke the check reminder screen. This is as it should be.

Now for the problem.
The "cron" job should cause a firing every minute (I will set this at something between one and 24 hours later, but it is one minute now for debugging purposes). The problem is that it is not firing or, at least appears not to be firing.

How can I debug this? How can I determine if this pseudocron job is working? IOW, how can I see if there is a timer job running?

Shelly




Shelly,

I suggest you take this up with the people you got the pseudo-cron job from. They know their script; we don't.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================

.



Relevant Pages

  • Re: "Pseudo" cron job
    ... don't have access to write a real cron job. ... OK, other than the timer firing things, all works well. ... how can I see if there is a timer job running? ... The previous one would only fire on Sundays. ...
    (comp.lang.php)
  • "Pseudo" cron job
    ... have access to write a real cron job. ... the user logs in the script is run. ... OK, other than the timer firing things, all works well. ... how can I see if there is a timer job running? ...
    (comp.lang.php)
  • Re: Correctness vs. speed
    ... > Hash: SHA1 ... I will end up firing you for wasting my time and money. ... Modifying a script to take the most common ...
    (comp.os.linux.misc)
  • Re: Checking Active Directory Passwords
    ... I would use a VB Script to bind to the AD, ... I would loop through it firing each user name into ... Pa55word ...
    (microsoft.public.windows.server.active_directory)
  • Re: Cant send email without being logged on
    ... Do you know if the script is firing? ... sessions to send mail and requires no authentication. ... >> email using CDO as outline in the script center. ...
    (microsoft.public.scripting.vbscript)