How can I disable notification for a specific gmail account during certain hours? My work and personal emails are attached to my phone. I'd like to avoid getting any notifications of work emails after hours.

If this can be done with Tasker, I can't figure out how. I can disable notifications in the gmail settings manually, but not sure how to affect this setting with Tasker.


I still want to receive notifications to my personal email
I still want to receive notifications in general
I still want my work email to sync (so I can check if I need you)
Toggling the syncing of Gmail for the account is the best option.  Turning of Gmail sync on a Google account in Android does not prevent you from fetching mail for that account via a method such as "pull to refresh" when you are viewing that account in the Gmail app.

I use Synker to integrate with Tasker, though I know there are other apps that expose Tasker control of specific sync settings on an account by account basis.

The basic outline I have is as follows:


A profile named "Work" whose conditions are a combination of a time, 9am-5pm, and a Date, Mon-Fri.  It has the same entry and exit task.
A task named "Work" that has two items: one to set the sync options of my work Google account to have Gmail sync on that is conditional on if %PACTIVE ~ *Work*, one to set the sync options of my work Google account to /not/ sync Gmail if %PACTIVE !~ *Work*


If I want to read work email when sync is not on for that account, I just open Gmail, switch to that account, and swipe down ("pull to refresh"), fetching the messages from the server.