TightURL PseudoCron

For those following along, I have been modifying pseudocron for use with TightURL.  Initially I rejected pseudocron and a similar solution as being too much effort to include and not quite what I needed.  So I set about writing my own job scheduler for TightURL.  At the point where I had an extremely primitive scheduler that only decided whether or not to run itself, I changed my mind again.

At this point, I felt I’d put in too much effort for what I had, which was a piece of code that did one thing and one thing only.  It was capable of running something once per-minute using a method I felt was suitable for TightURL, but that “something” needed to be a more sophisticated system for running tasks.  So I took another look at some GPL web-based job scheduling code, and now a modified version of pseudocron is now the only task my scheduler runs.  All other tasks are expected to be run under the pseudocron subsystem.

The major modifications to pseudocron are as follows:

  • crontab is now stored in a database
  • Logs are now stored in either text files or a database, or both
  • There is some failure detection for jobs, which causes the admin to be mailed
  • Jobs normally only send mail to the admin when they output something, just like *nix Cron
  • Jobs can be run in several different ways:
    • Included (default method from unmodified pseudocron)
    • Shell (Bash scripts, other PHP scripts, etc.)
    • Network (URLs)

As soon as this work is done, I will integrate the code into TightURL, and use it to run the anti-abuse tasks and reports.

This entry was posted in Uncategorized and tagged . Bookmark the permalink.

2 Responses to TightURL PseudoCron

  1. Jeremy Bicha says:

    I tried looking around for your source code but everything I see is over a year old. What do you recommend for someone who doesn’t mind beta (or even alpha if it works)?

    • ron says:

      I’m knee deep in a major new version.  It’s not even alpha though, and at the rate I’m going, it’s going to be a few more months before it’s ready.

      The version I run on tighturl.com is the same as the version available for download with one exception of no consequence.  I have required the URL table in the database to be named “urls”.  Otherwise it’s the same.

      I’m not really decided on a feature list yet either.  I don’t want to overpromise or drag things out forever.  An internal scheduler will be in there for sure because the anti-abuse system needs it.  I am going to try to get localization (translations) done also because that’s the most-requested feature.  Other than that, it’s hard to say.  There are a number of things under consideration.

Leave a Reply

Your email address will not be published. Required fields are marked *