Avoid race conditions when launching tasks

- Execute tasks in the proper order
- Remove sleep command
Magic string. Please make this a constant, shared with the constant the scheduler uses.