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
rameshramesh 

Line: 1, Column: 1 System.StringException: Unexpected end of expression.


cornexepresion 
system.schedule('jobNametest1111', '1,59,23,*,*,1-7', new batchschedual2());





my schedule program 
global  class batchschedual2 implements system.Schedulable
{
    global void execute(system.SchedulableContext scontext)
    {
       
        database.executeBatch(new batchannualrevenue());
    }

}






my batch program
global class batchannualrevenue implements database.Batchable<sobject>,database.stateful
{
    decimal totalrevenue =0.0;
    global database.QueryLocator start(database.BatchableContext bcontext)
        {
            return database.getQueryLocator([select id,name,annualrevenue from account where annualrevenue != null]);
        }
    global void execute(database.BatchableContext bcontext,list<sobject> recordstiprocess)
    {
        for(sobject records:recordstiprocess)
        {
            account accsrec = (account)records;
            totalrevenue +=accsrec.annualrevenue;
        }
    }
    global void finish(database.BatchableContext bcontext)
    {
        system.debug('bcontext id is========='+bcontext.getJobId());
        
        asyncapexjob jobdetails =[select id,status,numberoferrors,totalJobItems,jobitemsprocessed,createdby.email from asyncapexjob where id =:bcontext.getJobId()]; 
        //===========================
        BatchJobNotificationsHelper.SendBatchJobStatusNotification(jobdetails, totalrevenue, 'batchannualrevenue');
    }      
}
AnkaiahAnkaiah (Salesforce Developers) 
Hi Saki,

Run the below code in developer console.
batchschedual2  sbc = new batchschedual2 ();
String sch = '1 59 23 * * 1-7';
String jobID = system.schedule('jobNametest1111', sch, sbc);
Refer the below link.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_scheduler.htm

If this helps, Please mark it as best answer.

Thanks!!