Setting Delayed Startup for OneDrive on Windows

On Windows, both OneDrive and Clash have nearly the same startup time, causing OneDrive to get interrupted by Clash when it tries to log in automatically. This results in OneDrive getting stuck during the login process. At this point, I have to quit and restart OneDrive for it to log in properly, which is quite annoying. To solve this, I decided to set a 1-minute delay for OneDrive's startup after booting up using the Task Scheduler. Below is the process I followed to set it up.

The setup steps are as follows:

  1. First, open Task Manager, switch to Startup apps tab, right-click on OneDrive, and disable its startup option.
  2. Next, right-click on the Start Menu button (Windows icon) on the taskbar and open Computer Management.
  3. In the left sidebar, click on System Tools > Task Scheduler > Task Scheduler Library, and then select Create Basic Task on the right. Enter a task name and description, then click Next.
  4. On the following page, choose When I log on, then click Next.
  5. In the next step, select Start a program and click Next.
  6. In Program/script, browse or directly paste "C:\Program Files\Microsoft OneDrive\OneDrive.exe", and in Add arguments, enter /background to start OneDrive in silent mode. Click Next.
  7. Check Open the Properties dialog for this task when I click Finish and click Finish.
  8. In the pop-up window, switch to the Triggers tab, select the task you just created, and click Edit below.
  9. Check Delay task for, and choose 30 seconds or 1 minute from the dropdown. Click OK twice to save the changes.
  10. To modify the delay time later, you can select the task, and on the right, click Properties to open the settings window.

After completing the setup, restart the system to verify the effect. OneDrive will start only after Clash has fully launched, and it should log in successfully soon afterward.