+ Start a Discussion

Force full abort / delete jobs on Package uninstall

I want when I unistall my package it should forcefully abort/delete all scheduled/apex jobs created by Package + some Jobs created manually (where jobname=xyz..) 

Any help will be appreciated
Shashikant SharmaShashikant Sharma
You could delete the Jobs first and uninstall the app.
String jobId = 'provide the job Id';

if more than one JOBS you could query from this object : http://www.salesforce.com/us/developer/docs/object_reference/index_Left.htm#CSHID=sforce_api_objects_asyncapexjob.htm|StartTopic=Content%2Fsforce_api_objects_asyncapexjob.htm|SkinName=webhelp

Filter your query based on the ApexClassID field.