Cron is great if you have access to the intimate entrails of your Web server. Poormanscron is for the rest of us. Neither is online realtime. What if we could have cron online realtime for testing and rush jobs?
Cronline will give you cron online. Poormanscron but online from an administration page using Ajax to run Poormanscron interactively. You will be able to run search index builds and other stuff immediately.
I am running Cronline as a Google Summer of Code style project but without Google, no summer, no cash and no tshirt. It will be a Sydney Winter of Code project.
All suggestions welcome and yes, if I find out how to make Ajax make pizza or express a decent double shot latte, I will add those enhancements.
Comments
What is the advantage?
Isn't it easier to just visit http://mysite/cron.php?
On a more serious note, this _could_ be handy if it offered an interface for calling the cron hooks of selected modules instead of calling the cron hooks of all enabled modules.
Suggestions welcome
Once the interface page is working, the interface can be expanded to a range of options. The initial project is to get the interface talking with the process and reporting progess.
petermoulding.com/web_architect
petermoulding.com/web_architect
Cronline beta 0.0001
I made a start on Cronline, the online cron. It is easier to see what is happening and control execution with Cronline. My current version does not use Ajax or have an automatic repeat or make a great espresso.
If someone wants to use Cronline beta 0.0001 for testing search or other cronable activities then send me a note, preferably of a large denomination.
The following virtual screenshot shows some options for Cronline then the options per module. Cronline finds modules with a cron function, lists the modules with hard coded comments and gives you the option to select one or more modules for this process. Any results are listed at the bottom of the page.
I tested it with Search and replicated the statistics display from search in Cronline. If Search and other cronable modules had a statistics function, I could use that to display the status.
You still have to go into search and the other modules to set parameters. I may add a time limit parameter to Cronline one day next century.
cronline
options
Display task results.: [yes/no]
Display the results in this page.
Log task results.: [yes/no]
Log the results in watchdog.
node
[ ] node
db_query('DELETE FROM {history} WHERE timestamp < %d', NODE_NEW_LIMIT);
watchdog
[ ] watchdog
search
[ ] search
97% of the site has been indexed. There are 9 items left to index.
Search activates the _index function in other modules.
statistics
[ ] statistics
petermoulding.com/web_architect
petermoulding.com/web_architect
Drupal 5.0
Cronline went live with Drupal 5.0 today. Have not tested it extensively. Croneline is of most use when you are developing things that will use cron and you want to test the cron hook manually.
petermoulding.com/web_architect
petermoulding.com/web_architect