CRONs for Java: crontab4j

The first pre-stable version of my latest project crontab4j is now available.

What is it?

The name is plain enough: it allows you to schedule Java jobs using CRONs.

Before going further, keep in mind this version is a WIP. For instance, I heavily use regular expressions now (I love regexps), but I plan on moving to grammars to make things more scalable and easier to debug.

You said available?

Well, right. You can get the sources and compile it yourself, as any Maven project.

I might publish it to Maven later, when I get a stable 1.0.0 version. Until then, you will have to build by your own means.

Doesn’t it fit into the yet another category?

What does not, nowadays? Yes, I know of two other tools which can do the same.

Quartz

Quartz is the well-known Java scheduling library. It is not CRON-centric, but it is powerful and integrates nicely inside a Spring context.

This is why I actually suggested, but my boss thought it might be too much for a simple job. So I took the challenge and wrote a simple parser for him. And made something more elaborate on the side.

So, is it really lighter? It does less things, so it better be! At the current time:

  • Quartz: 645 KB
  • crontab4j: 45KB

And this does not include the transitive dependencies: the goal was to get rid of everything useless. Quartz has been progressing on this aspect, but just before version 2, it had nine dependencies, not counting the transitives. Now it only has two. I must wait to have a stable version before bragging.

cron4j

I did not know of cron4j before I looked to see if the name was already taken, which made me choose crontab4j to avoid confusion.

So, why did I persevere in making crontab4j? First, because I already had taken up the challenge. Second, because I keep in mind that most Java applications today use a Spring context, and therefore need compatible tools, which I aim to provide.

What’s next?

I have established a roadmap, you can see it along with the rest of the project: https://cychop.github.io/crontab4j/.

More to come…