I am attempting to distribute Leads from a list on a weekly basis. I have this code which somebody was kind enough to help me with :
global class WeeklyPreOppProcessor {
{
global void execute (SchedulableContext scx)
{
Group group = [Select Id, Name FROM Group
WHERE Type = 'Queue'
AND Name = 'Distributed_Queue'];
List<Lead> lstLead = [SELECT Id, Name, OwnerId
FROM Lead
WHERE Distributed__c = false LIMIT 50];
for(Lead leadObj:lstLead)
{
leadObj.Distributed__c = true;
leadObj.OwnerId = group.Id;
}
update lstLead;
}
}
But this is producing an error : "Global variable must be contained in a global class...". I don't understand this since I have the class labeled as global.
Any ideas ?