Added support for expires option of a periodic task.