Though you may leverage apps script with time based trigger to do that, but am curious to understand your use case for it, are you trying to based time based access restrictions?
if yes, context aware access with date/time based policy would be a better option.
Thanks @goldyarora ,
i have a synced OU with no application access , nothing on google identity provider , this OU sync from AD, there are many automation attached to this OU, so I can't move any users from the local OU in AD.
The google support team asked me to create new OU on google and try to move any user that required email access because under google I disabled any application for that OU.
now I need a script or automation to look for user's end with @zxd.com domain and move the user to new ou so they can access the email and auto licenses.
Thanks
I understand, though apps script can do that with time based trigger e.g run moveFunction every morning automatically at 8 a.m as you need (later part of this video shows how to leverage time based triggers in apps script https://youtu.be/IFecKxi3WN4) but moves from orgUnit may take sometime in propagation.
If you are on context aware access supported subscription, you may better leverage date time based access policy (https://cloud.google.com/access-context-manager/docs/time-and-date-conditions) which might say if the user is trying to access this specific app or apps (e.g Gmail) between this to this time, then allow or don't allow access.