To reschedule scheduled jobs I am currently deleting the previous job and then scheduling a new one within a transaction so if the schedule fails it rolls back the delete:
using (var transaction = new TransactionScope(TransactionScopeOption.Required))
{
BackgroundJob.Delete(jobId);
BackgroundJob.Schedule(...);
}
This involves keeping storing the original arguments somewhere so I can reschedule with the original args.
I was wondering whether there was any ramifications to doing the following instead:
new BackgroundJobClient().ChangeState(jobId, new ScheduledState(timespan), ScheduledState.StateName);
This way there is no need to keep the original job arguments around and also is transactional.