Category Archives: projects

Easy cron scheduling in Ruby.

You do Ruby. You are on *nix. You have a task you need to schedule using cron from your scripts. Later you schedule another task. After some time, and probably from another script, you want to unschedule/cancel the first task … How do you do it?

Fetch CronEdit

    sudo gem install cronedit

….and just do it:

    Crontab.Add  'agent1', '5,35 0-23/2 * * * echo agent1'
    Crontab.Add  'agent2', {:minute=>5, :command=>'echo 42'}
    Crontab.Remove 'agent1'

You can CRUD your tasks independently (based on the IDs you give them). The schedule can be in Hash notation, or the standard cron text definition.

UPDATE: The new version of library allows you to do some more tricks. First of all, you can manipulate groups of definitions (bulk/group operations). Besides modifications of the actual crontab, you can do now all operations upon files or in memory. And you can combine these ‘devices’ as needed. Let me show you a small example:

    fc = '/jobs/mail-delivery.cron'
    Crontab.Merge fc
    Crontab.Subtract fc

The previous snippet loads a group of cron definitions from file and merges them with the current system crontab. On the last line the same group of definitions is removed from the system crontab.

See documentation for more details and examples.
UPDATE: A related article discusses the library in context of scheduling of Ruby Agents using Cron.

In Ruby there are few schedulers out there, for example the most advanced: openwferu scheduler. They are great for many task, yet…. they are Ruby proprietary schedulers and the host ruby script needs to be running. If you need native cron scheduling, for whatever reason, go for CronEdit.

Rhotoalbum – a ruby photo album generator

Do you want to have photo albums (on your site)? I did. I wanted a comfortable but not “over-web20-ized” user experience, and above all, simple and pragmatic content management/control.

Believe or not, nothing I came across was just the right thing. Too heavy, too weak, too ajaxy, unacceptable license, etc. At the end of the day I found out I had not had to look too far. Ondrej Jaura (a good friend of mine) created a simple command-line album generator – Rhotoalbum. Bonus: it is written in ruby :)
You treat your images as ordinary files in directories (which stand for albums) and run a generation command. That’s all you need to do. You add new images or change something? Just run the same script – anytime. It creates necessary thumbnails, and simple style-able index pages. For slideshow purposes it (optionally) integrates with nice TripTracker.

My way of appreciation of my Ondrej’s great work was … to contribute the project and help out in making it better. This resulted into a release of a new stable version 0.3 these days.

Well, I started this post saying I wanted some place for our photos to show them to friends occasionally. Here is are our Rhoto photo gallery. Another showcase for Rhotoalbum is Ondrej’s photo gallery.

Acquisition of LumberJaczk Technologies

LumberJaczkIn Summer 2005 I started few home-made experiments with workflows for governing complex processes – such as system integration on Web layer. I did this as a part of my PhD activities. The main motivation had been my deep disappointment with all the “enterprisy” workflow systems bull**** laying around. I needed something very dynamic, light-weight and portable. I needed a hammer !

I engaged with Mozilla platform and built a workflow engine on top of this unbelievably feature-rich and mature open-source technology. This platform, surprisingly, allowed for much more. So I added libraries for Web navigation, information extraction, rich GUI, etc.

At the end of the day, there it was: a system for development and execution of full-fledged personalized on-top-Web applications. Users could create and share their own scenarios, own personal agents for searching best cars, checking back account, performing complex transactions on portals, or making any mashups crimes. You can learn more about it on the LumberJaczk homepage. From the very beginning the system was meant to be open-source as it really fits the model.

In mids 2006 a wave of strong interest arouse from commercial segments. Unfortunately this interest clashed with the open-source strategy.

Lixto Software GmbH.May 2007 – The end of the story (or beginning of another one). Lixto Software GmbH acquires the LumberJaczk technologies. Lixto is at the moment one of the market-leaders in the field of Information Extraction and a solution provider for Online Market Intelligence, Web Process Integration and Metasearch. Openly, the current plan of the company is to keep the source closed.

I hope interesting things will happen!

New Version of XPather 1.1

XPatherHola hey! A new version of XPather is out since Sep 29 2006. Though it may take some time to appear also on AMO, it is already available at XPather’s site.

The new version brings few severe bugfixes, improvements, and two new features:

  • Cross-frame XPath evaluation – You can evaluate your XPaths from one place against all frames/iframes/etc in the document.
  • Handling of default namespaces – The documents with default namespaces can be queried.

For the detailed list of changes check out the changelog. All of you folks who have already installed XPather (and who have not deactivated the automatic extension updates) should get the updates automatically.


On-top-of-Web Applications’ Address:

Two weeks ago I announced the new project – the LumberJaczk. There I described it as: LumberJaczk - On-top-of-Web applications

An open-source technology that enables better ways to get and use information on the Web. It let people run and create light-weight on-top-of-Web applications and share them with others. Hacking out your own “best flights search”, “personal investments monitor” will be fun to do.

Since yesterdays late night, the LumberJaczk has its official Web running public at:

Besides the “obligatory” project information the site features few use-cases and screencasts showing the LumberJaczk in action. To keep you informed of what’s going on next subscribe to the project news RSS feed, or join/browse the project mailing list. I’m looking forward to hearing from you guys :)

New Applications on Top of the Web – LumberJaczk is coming.

I’m really looking forward to announce my project I’ve been running since the last summer. And it’s about to happen soon, really soon :). Its mission has crystallized to be: New LumberJaczk Project

An open-source technology that enables better ways to get and use information on the Web. Let people create light-weight on-top-of-Web applications of their own and share them with others.

Hacking out such use-cases like “best flights search”, “personal investments monitor” will be fun to create. At least for me it definitely is :) All based on Firefox browser and it’s Mozilla guts. BTW, the project name: LumberJaczk.

So where are we now?
The system has already been functional and ready to use in alpha version for some time. What keeps me busy right now, more than I expected, is preparation of all sorts of presentational stuff to communicate the project to public clearly and concisely. Presentations, screen-casts, docs are ready and the web page is in progress. My estimations are the first come-out of the Web is to happen the next Mon, May 21 at So check back, subscribe or whatever… I’m looking forward to hearing some feedback once it’s out. After that another big thing is to make a code due-diligence so the code release can follow soon.

Mozilla DOM W3C Connector announced

Mozilla DOM to W3C ConnectorJust an information: Peter Szinek, a friend of mine is about to release the Mozilla DOM W3C Connector he implemented. It allows you to access the Mozilla DOM as W3C DOM from within Java when embedding Mozilla. This is fundamental if you want to use standard XML tools and libraries to operate directly on Mozilla DOM, e.g. XML, XSLT, XPath, XQuery. Read more in his original  post.

We’ve been using it for few months and it proved to be stable. The bad guy seems to be sometimes JavaXPCOM ;)

How is the XPather doing?

Recently, a friend of mine asked me how is my XPather doing (for those who do not know it, XPather is a Firefox browser extension that generates XPath of DOM elements either directly from the browser or while inspecting the DOM in DOMInspector. Further, it evaluates XPaths, works with relative XPaths, extend filtration by regexps and allows for simple content extraction.)

So the friend picked my brain for some stats like downloads, user-base, support, new plans … To be honest, he surprised me. I was pretty busy for the last few months so ehm… I didn’t really know somehow. Right that evening I took a look into it and found out the following:
The XPather is now in its 7th month since the first release hosted on and on its project home The number of downloads hits 10500 this week. It would be also very nice to see how many active users are out there. The first approximation here could be to have an average count of daily update requests. Although many users has automatic updating turned off, while others are just “quasi-users” that just installed the extension (like 10000 other extensions they tried out) but have never used it. The only numbers I can get is from the XPather homepage: 35% of the downloaded installations are still active. Would be nice to get such statistics from As for user feedback and comments, I have to admit I expected a bit more :) Anyway. It was a nice finding, after all, the people are still pretty interested in data extraction, screen-scraping, greasemonkey scripting etc. Personally, I still use the tool for quick hacking of web pages or when I work with XML.

And for the plans ? Well, I consider the project to be in maintenance mode as I focus completely to a new project called LumberJaczk. But still, if you people have some features you’d like to see in the XPather, or find some bugs, let me know. I’m here to fix it.