- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
11-14-2012 10:14 AM
I have a package which adds a scheduled job in the post install class. The job is being added, with the submitted by my package. The apex job seems to run at the scheduled time, but the actions from that script are not performed.
If I delete the job and schedule it again the script actions are performed normally.
Does anyone know how I could solve this issue?
11-19-2012 07:44 AM - edited 11-19-2012 07:44 AM
You are brave to try this. The install handlers are terrible. It would be a miracle to get one to do what you want it to.
On a side-note, I do not have the answer to your question. Sorry.
11-20-2012 03:40 AM
Hi, did you figure out the reason for this issue? Did you get a chance to fix it? I am having the same issue with scheduling an apex job from post-install script.
As referenced in the documentation, the post install scripts run as a specil system user that represents your package, so all operations performed by the script appear to be done by your package. If you check your scheduled jobs from monitor, you will find your scheduled job is submitted by a user, who doesn't exist any more, after the package is installed. But the apex class in the schedule is still trying to execute with that user, I think that's the reason for this issue. But I cannot find a way to fix it, I guess it's SF bug.
Anybody has the same issue?
11-29-2012 03:37 AM
I wasn't able to figure out how to get this working. I had to make some workaround and the first time the app is being set up I add the scheduled jobs as well and this way is being added by a real user.