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
gtuerkgtuerk 

Spring '10 - ApexScheduler not available?

I'm executing some anonymous Apex from the (changed) System Log in tapp0, which has recently been upgraded to Spring '10.  Although I have a Scheduled class and have used System.schedule to schedule the job, I don't see succcess in the system log and the scheduled job does not appear in my list of scheduled jobs.  Is something funny going on with the Pilot?  this is critical functionality for our organization.
tmatthiesentmatthiesen
To confirm, you are simply calling system.schedule() via the system log?  Can you post your code?  
gtuerkgtuerk

I've pared it down to not even being able to run anonymous Apex from the System Log.  It seems to work but doesn't display any results.  Here are the two things:

 

Anonymous apex:

 

List<Account> accts = [select Id, Name from Account limit 10];

 

says it works but doesn't spool to a log:

 

Last execution at 01/27 16:19:43 in 83 milliseconds.

 

and I am using System.schedule like this:

 

DateManager_InternalSO datemgr = new DateManager_InternalSO();

String sch = '0 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59 * * * ? 2010';

system.schedule('ISO Date Manager', sch, datemgr);

 

Where DateManager_InternalSO is a ScheduledApex class (implements Schedulable).  No scheduled job is created when the above is run.

 

All this works fine in Production (Winter '10) but not in tapp0 (Spring '10)

 

tmatthiesentmatthiesen

There was a bug in the pilot that allowed developers to programmatically invoke a job that ran every minute.  We fixed that in the GA release.  We only support a max frequency of hourly.  I just tested a similar process and received the following:

 

15:55:30.037|CODE_UNIT_STARTED|[EXTERNAL]System Log Window15:55:30.051|EXCEPTION_THROWN|[2,1]|System.StringException: Seconds and minutes must be specified as integers: 0 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59 * * * ? 201015:55:30.052|FATAL_ERROR|System.StringException: Seconds and minutes must be specified as integers: 0 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59 * * * ? 2010

 

I'm concerned you do not see this in the system log window -as I do in my instance.  There is a filter bug that is being fixed tonight - can you validate this tomorrow morning?  If this is still an issue, I will work with QA.

gtuerkgtuerk
I don't consider being able to schedule by the minute a 'bug'.  Arbitrarily keeping a buffer/response pattern from operating at REGULAR (by-the-minute) intervals keeps a buffer table clear.  This seems like a bait and switch on the Scheduled Apex implementation that I will vociferously denounce.  BOOOO
tmatthiesentmatthiesen

There is no bait and switch.  Can you send me an email directly.  I'd like to know which pilot customer you are working with.  There was obviously a miscommunication in the pilot program- since all customers were notified of the restrictions.  I'd like to see if we can find a resolution for your issue.

gtuerkgtuerk

@future will likely work for us.  thanks for walking me through it.  Still having the problem with the System log but I see other posts on that and will just watch those.  thanks

g