You need to sign in to do that
Don't have an account?
ismyhc
How to package an app that has a scheduled batch job ?
Im in the process of packaging our code so that a client of ours can start testing our app. One of the processes invloved in our app is a scheduled job that happens once a day. Ive been just setting up cron through the "system log" so far while in development mode... like soo...
system.schedule('Advertiser Batch Job', sch, m); scheduleAdvertiserBatch m = new scheduleAdvertiserBatch(); String sch = '0 56 10 * * ?';
How would I package something like this? Or will the client have to schedule the batch job manually?
Thanks!
Jacob Davis
Create a custom configuration page (e.g. /apex/namepace__appsetup ), and have the administrator click a button to run the code. There isn't yet a "run on install" mechanism like you would have with a desktop-based installation program, so this is probably the ideal approach for now.
Edit: You can set up a Web Tab or Visualforce Tab for the configuration; they could remove/hide the tab after they've used it. Or, you could even make it a splash page for a certain tab.
All Answers
Create a custom configuration page (e.g. /apex/namepace__appsetup ), and have the administrator click a button to run the code. There isn't yet a "run on install" mechanism like you would have with a desktop-based installation program, so this is probably the ideal approach for now.
Edit: You can set up a Web Tab or Visualforce Tab for the configuration; they could remove/hide the tab after they've used it. Or, you could even make it a splash page for a certain tab.
Perfect.
This is will work just fine!
Thanks!