I’ve been doing a lot of Google App Engine development lately and getting increasingly familiar with how it all works. I was curious as to how the SDK (specifically appcfg.py) goes about pushing applications up to the cloud and wasn’t surprised to find that it’s actually quite simple, trading your credentials for a token and then pushing files up one by one (wrapped in a transaction). What I was surprised to find though was a seemingly complete implementation of a feature that has been requested time and time and time and time and time again: cron jobs.
The cron implementation appears to have been checked in by one Dan Sanderson (a Programmer/Writer at Google according to LinkedIn) with subversion r34 (1.1.8) back on the 15 January 2009, though apparently I’m not the first to spot it. Thanks Ross M Karchner for kicking the tyres and working out that while the SDK and APIs are in place and cron entries can be created, the events don’t fire just yet (and Google for the new toy – it’s great to know now what we’ll be able to do soon).
Finally, and arguably most importantly for those of us working on enterprise deployments rather than hobby projects, utility billing is overdue and eagerly awaited.
I’m expecting to see this major update drop some time in the next few weeks, securing Google’s position as one of a small number of major Platform-as-a-Service (PaaS) players. In the mean time we’ve got offline Gmail to play with.
Update: Here’s a comment I left on issue 6 which gives some more technical details:
I just spotted this in the latest SDK release so it looks like cron (among other things) is just around the corner: $ ls -la google/appengine/cron/ total 272 drwxr-xr-x 12 samj admin 408 17 Jan 12:18 . drwxr-xr-x 11 samj admin 374 17 Jan 12:18 .. -r--r--r-- 1 samj admin 27359 15 Jan 03:16 GrocLexer.py -rw-r--r-- 1 samj admin 25813 17 Jan 12:18 GrocLexer.pyc -r--r--r-- 1 samj admin 21071 15 Jan 03:16 GrocParser.py -rw-r--r-- 1 samj admin 18377 17 Jan 12:18 GrocParser.pyc -r-xr-xr-x 1 samj admin 646 15 Jan 03:16 __init__.py -rw-r--r-- 1 samj admin 313 17 Jan 12:18 __init__.pyc -r-xr-xr-x 1 samj admin 1909 15 Jan 03:16 groc.py -rw-r--r-- 1 samj admin 3050 17 Jan 12:18 groc.pyc -r-xr-xr-x 1 samj admin 7848 15 Jan 03:16 groctimespecification.py -rw-r--r-- 1 samj admin 10029 17 Jan 12:18 groctimespecification.pyc From the comments in the code, here's what you can expect: A Groc schedule looks like '1st,2nd monday 9:00', or 'every 20 mins'. This module takes a parsed schedule (produced by Antlr) and creates objects that can produce times that match this schedule. A parsed schedule is one of two types - an Interval, and a Specific Time. See the class docstrings for more. Extensions to be considered: allowing a comma separated list of times to run allowing the user to specify particular days of the month to run An Interval type spec runs at the given fixed interval. They have two attributes: period - the type of interval, either "hours" or "minutes" interval - the number of units of type period. A Specific interval is more complex, but define a certain time to run, on given days. They have the following attributes: time - the time of day to run, as "HH:MM" ordinals - first, second, third &c, as a set of integers in 1..5 months - the months that this is valid, as a set of integers in 1..12 weekdays - the days of the week to run this, 0=Sunday, 6=Saturday. The specific time interval can be quite complex. A schedule could look like this: "1st,third sat,sun of jan,feb,mar 09:15" In this case, ordinals would be [1,3], weekdays [0,6], months [1,2,3] and time would be "09:15". Seems I'm not the first to discover this, and while the SDK works and cron-related log entries are written the cron events don't fire just yet. Sam 1. http://groups.google.com/group/google-appengine/browse_thread/thread/4376bdd02b7bfa3f?pli=1