Try the attached workflow to see if this is what you want.
The workflow will:
1. Disable backup scheduler on CS
2. Get list of MA and Put MA's in Maintenance Mode
3. Suspend All Jobs and check to ensure the jobs have been suspended before proceeding
*4. Not connected in the workflow - Connect job suspended line to ForEachMA2. This will run your script on each MA. Under Execute Command, change the path where your script reside.
5. Suspend workflow after the scripts ran.
6. Enables backup scheduler on CS
7. Take MA out of Maintenance Mode.
8. Resume All jobs
Hope this works for you.