I have automated the closing of OneDrive and loading of CCleaner with a batch, as follows...
echo "Stopping OneDrive"
"C:\Program Files\Microsoft OneDrive\OneDrive.exe" /shutdown
echo "Starting CCleaner"
"C:\Program Files\CCleaner\CCleaner64.exe"
exit
Once I've done my clean, I run the following batch to restart OneDrive, again, silently.
start "OneDrive" /B "C:\Program Files\Microsoft OneDrive\OneDrive.exe" /background
exit
Ensure the paths in the above are correct for your system.
Hope this helps.