If you want to schedule apex within Salesforce, you need to implement Schedulable - even if it is just to run daily. Then, you can write a cron expression to schedule it how you'd like or use the UI to schedule it as well.
There's also now Scheduled Flows which presents another option although I believe it's limited to 250,000 flow interviews a day so you need to take that into account.
For your question, you could create a separate class to handle scheduling or you could have the same class that's implementing Database.BatchableContext
implement Schedulable
. You'd do something like this:
public class BatchSchedulableClass implements Schedulable, Database.Batchable<sObject> {
public String Query;
public BatchSchedulableClass(){
Query = 'SELECT Id FROM Account';
}
//for the schedulable to execute the batch class (this class)
public void execute(SchedulableContext ctx){
Id batchJobId = Database.executeBatch(this,100);
}
public Database.QueryLocator start(Database.BatchableContext BC){
return Database.getQueryLocator(query);
}
public void execute(Database.BatchableContext BC, List<sObject> scope){
//do logic here
}
public void finish(Database.BatchableContext BC){
//do any finishing for the batch job here
}
}