function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
DSLDSL 

Task to run Apex - like cron

Is it possible to create some sort of task to run my custom apex code? I have an app where I want to periodically run some outbound web requests, then possibly generate alerts based on my response.

 

I can do it by having the user click a link, but can this scheduled somehow to run every hour?

 

Thanks!

D

Best Answer chosen by Admin (Salesforce Developers) 
venkateshvenkatesh

Link :- http://scott.morrisonlive.ca/sfSimpleBlog/show/stripped_title/time-based-batch-scripts-in-salesforce

it did the trick for me..i hope it will help u..

 

Cronkit also is a good option which implements the above method..i hv changed the above to support minute basis scheduling also..But one thing work flow will not gurantee that ur schedule gonna run in the perfect time. For me also it delays sometime(12-15 mins delay), once the 1st schedule happens it will work fine after that.

 

 

Cheers smruti :)

Message Edited by venkatesh on 03-01-2009 09:08 PM

All Answers

JimRaeJimRae

I would recommend CronKit, it is a free solution available on the AppExchange.

Or, you could build your own, based on triggers and time based workflow (this is how CronKit does it as well).

venkateshvenkatesh

Link :- http://scott.morrisonlive.ca/sfSimpleBlog/show/stripped_title/time-based-batch-scripts-in-salesforce

it did the trick for me..i hope it will help u..

 

Cronkit also is a good option which implements the above method..i hv changed the above to support minute basis scheduling also..But one thing work flow will not gurantee that ur schedule gonna run in the perfect time. For me also it delays sometime(12-15 mins delay), once the 1st schedule happens it will work fine after that.

 

 

Cheers smruti :)

Message Edited by venkatesh on 03-01-2009 09:08 PM
This was selected as the best answer