hello all, can anyone tell me what the correct syntax is to schedule the system job on a regular basis via the xml configuration files? I do not find a clear answer on this in the documentation. I’ve tried using “SchedulingCleanDataBaseSetting” but that doesn’t seem to work. Any thoughts on this?
I’m not sure if on SaaS they have it already configured automatically in the background and if this “SchedulingCleanDataBaseSetting” option is to override the SaaS one.
But you can make a specific job for it and add the crontab to it.
<Job Identifier="CleanDatabase" DisplayName_L1="Clean Database" CronTabExpression="*/15 * * * *" CronTimeZone="ServerTime">
<CleanDataBase Identifier="CleanDatabase_CleanDataBase" DisplayName_L1="Clean Database" DisplayName_L2="Nettoyage de la base de données" Level="0" />
</Job>
“At 02:00 on every day-of-week from Monday through Saturday.”
Tip:
To set up a crontab file, I like to use a simple website Crontab.guru that lets me check the configuration in plain language, and then I copy and paste the generated text into my configuration file.
hello Kamil, so this is basically the xml that is generated by the scaffolding ‘CleanDatabaseJob’’ but adding a crontab to it? I previously tried to schedule it instead with ‘SchedulingCleanDataBaseSetting’. It is supposed to override the default values (whatever that is) but it doesn’t seem to work. I’ll try without the override option now.
the override option ‘SchedulingCleanDataBaseSetting’ doesn’t seem to be doing much. I myself ask Co-pilot to generate the crontab expression that I need, which works just fine. Thanks for the feedback.
hello Kamil, I’ve tried your suggested solution (I scheduled a daily execution) but nothing seems to have happened over the weekend. I don’t see any automatically executed job.
Using ConsolidationMode=“Merge” is indeed better.
It seems that creating a job with the CleanDataBase task will terminate itself.
So you need to use the scaffolding CleanDatabaseJob.