Method to block calls on dual SIM and block notifications from some apps (scheduled) I recently got a Motorola G5S Smartphone with Android 7.1.1 with Dual SIM. One SIM is work-related, the other private. Also, every App on my phone is either work-related or private.

I'm searching for an app (or integrated function) which can do the following:


block all calls &amp; messages coming into the work-SIM at night &amp; on weekends
block notifications of the work-related apps at night &amp; on weekends


The tricky thing here is that I do want to use the mobile data from the work-SIM, so disabling it completely is not an option.

I checked out Tasker but the description doesn't say anything about blocking calls coming in to one of the numbers/SIMs. On the other hand, the "Do not disturb"-option also cannot to block only calls to one SIM (at least on my phone).

Is there any other app or even built-in feature that I'm missing? Rooting the device would not be a problem, I guess.
Caveats


OP is willing to reject unknown numbers in weekends
They have their office contacts and private labeled in their address book
Only office people call on office SIM , they are not aware of private SIM number and vice versa for private contacts
They can continue to use data from Office SIM
Not tested on dual SIM but should work 


I don't think it is possible using SIM based approach, alternative non root automation approach using macrodroid which is simple and easy free up to five macros ( App link )

Blocking calls in off times

Create a macro and name, save it  (Add Triggers,  actions and constraints by pressing +)

Triggers


Call Incoming &rarr; Select Groups &rarr;  Office (office numbers stored in contacts and grouped by this name)
Call Incoming &rarr; Select Contacts &rarr; Non Contact (additionally select Unknown caller if required)


Actions

Call Reject

Constraints

Day of the week &rarr; Saturday &amp; Sunday

add constraint of  AND /OR /XOR/ NOT &rarr; OR (ensure the little inverted triangle shows OR)

add constraint Time of day &rarr; set start and end time for example 2000 to 0800

what it does is that on weekends OR during specified times calls made by non contacts  / unknown numbers and office folks are rejected

Test it by changing triggers and constraints . Use the 3 buttons menu &rarr; Test Macro



Blocking Office app notifications

Trigger

Notification &rarr; Notification Received &rarr; select apps &rarr; choose office apps from drop down &rarr; Text content &rarr; Any

Actions


Volume change &rarr; Notification &rarr; Set slider to zero
Clear Notifications &rarr; select apps &rarr; choose office apps from drop down &rarr; Text content &rarr; Any
Volume change &rarr; Notification &rarr; Set slider to the level desired


Constraints As in above macro ( Hint: from 3 dot menu use clone macro to get a copy of macro to save repetitive selection)

What it does


Action 1 mutes the notification volume to zero ( you don't need to hear the ding when you don't want to be notified)
Clear notifications during the time / day chosen in constraints
Action 3 restores desired volume level so that you can hear other other notifications that you  want to