Scheduled Workflow self-cancellation


I have a workflow that runs on a Schedule. but I also want to be able to stop and cancel the Schedule if a certain condition is met. Is there a way to do this such that the entire thing is self contained? IE I do not need another process to look for the ScheduleId and cancel it there, but rather the Scheduled Workflow can trigger on a condition to cancel its own Schedule?