App script ok vs automation run script

I’ve written this little script and it runs very well as an app.
But if I run it as an automation run script, it runs successfully but does nothing, no update and no error.
I’d like to understand why the automation mode is not effective ?
Thanks for your help.

const tEssai = base.getTable(‘Essai’);
let rec = await tEssai.selectRecordsAsync();
const dte=new Date();
await tEssai.updateRecordAsync(rec.records[0].id, {
“Nom” : “Foo”+dte.getMinutes(),
“date1” : dte