def getCronJobsFields():
    form_fields = grok.Fields(interfaces.ICronJob).select('task', 'name', 'minute', 'hour', 'dayOfMonth',
                                                              'month', 'dayOfWeek','delay')
    form_fields['minute'].custom_widget = WidgetMinute
    form_fields['hour'].custom_widget = WidgetHour
    form_fields['dayOfMonth'].custom_widget = WidgetDayOfMonth
    form_fields['month'].custom_widget = WidgetMonth
    form_fields['dayOfWeek'].custom_widget = WidgetDayOfWeek
    form_fields['task'].custom_widget = WidgetTask
    form_fields['delay'].field.description = _('One Time Job if a value is set (all others settings are ignored). Time in second from now.')
    return form_fields
 def name(self):
     return _('Remove mails older than ${days} days', mapping=dict(days=self.delay))