Schedule GAM command in Windows task Scheduler

189 views
Skip to first unread message

Cheryl Kiras

unread,
Feb 29, 2024, 3:29:54 PM2/29/24
to GAM for Google Workspace
I have read some of threads on this subject.   I put my GAM commands in a batch file.  I can run them manually and using the batch file.  I am struggling with getting it  scheduled to run in the Windows Task Scheduler.

Please share your experience and wisdom.

Thank you,
Cheryl

Maj Marshall Giguere

unread,
Feb 29, 2024, 4:26:30 PM2/29/24
to google-ap...@googlegroups.com
Cheryl;

You may find this Tom's how to helpful


Personally I find Window task management to be a pain.

--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/7a196928-d035-4434-ac1a-c8e604fefa41n%40googlegroups.com.

Cheryl Kiras

unread,
Mar 1, 2024, 8:04:04 AM3/1/24
to google-ap...@googlegroups.com
Thank you.  The article is a bit basic.  I use task scheduler successfully on windows systems.
The issue is running GAM commands with it.    Thanks



Cheryl Kiras 
Senior Systems Engineer
Mount Holyoke College

      


You received this message because you are subscribed to a topic in the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/gqeYEweBmmY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/CADSK1vsM0VjQpByU3ApN%2BVHBqzfqNA2eE%3DyGmFz_KsQcWCtK4g%40mail.gmail.com.

Cheryl Kiras

unread,
Mar 1, 2024, 10:02:37 AM3/1/24
to google-ap...@googlegroups.com
I resolved the issue, it was related to the windows account running the GAM commands.   I used the fixes in this article.
Now I can schedule the GAM commands using a batch file and running as a service account.   Yahoo!


1. Copied these files to the user profile of the service account    client_secrets.json, oauth2.txt, oauth2service.json
2. Copied the .gam folder to the service account profile
3. update any path information: cache_dir, config_dir, drive_dir
4. ran command: gam config drive_dir c:\gamwork save

All on the same servers.  Not multiple servers






Cheryl Kiras 
Senior Systems Engineer
Mount Holyoke College

      

--
You received this message because you are subscribed to a topic in the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/gqeYEweBmmY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-man...@googlegroups.com.

Cheryl Kiras

unread,
Mar 1, 2024, 2:24:40 PM3/1/24
to GAM for Google Workspace
Thank you Ross!

The problem was that I needed to create System variables in Windows Control panel when installing GAM.
I had created User variables only, so only that user could run GAM.

Now the GAM commands run from Windows task scheduler as the service account.   Yay!

Reply all
Reply to author
Forward
0 new messages