public void startCron(final CronWorkflowOptions options) {
long startTime = clock.currentTimeMillis();
Date expiration = new Date(startTime + options.getContinueAsNewAfterSeconds() * SECOND);
TimeZone tz = TimeZone.getTimeZone(options.getTimeZone());
CronDecorator cronDecorator = new CronDecorator(options.getCronExpression(), expiration, tz, clock);
DynamicActivitiesClient cronDecoratedActivities = cronDecorator.decorate(DynamicActivitiesClient.class, activities);
cronDecoratedActivities.scheduleActivity(options.getActivity(), options.getActivityArguments(), null, Void.class);
// Start new workflow run as soon as cron decorator exits due to expiration.
// The call to self client indicates the desire to start the new run.
// It is started only after all other tasks in the given run are completed.
selfClient.startCron(options);