We often refresh Pilot with data from Live, but each time I need to go in and manually delete a bunch of scheduled tasks that shouldn’t run on Pilot. Is there a way to bulk delete all scheduled tasks?
@Adam This is a portion of my restore that does that.
use [EpicorPilot]
/* Disable all schedules */
UPDATE [ice].[SysAgentSched] SET Enabled = 0
UPDATE ice.SysAgent SET SysAppserverURL = '',SysDNSEndpointIdentity=''
/* disable all routing */
update ice.ReportStyleRule SET IsEnabled = 0
delete from Ice.ExtServiceRegistration
where ServiceID = 'TaskAgentService'
/* Purge SysTask tables */
TRUNCATE TABLE [ice].[SysTaskParam]
DELETE from [ice].[SysTask]
1 Like
Oh, cool. Do you just run a custom script on a restore DB when you refresh it for all of your changes?
Yes, the script does the restore and all of the cleanup