Autotask issues transactions before the time indicated by the cronjob

I'd expect there to be at least 80 seconds between each run of the autotask (desired behavior), but that's not what is happening as it can be seen in the timestamps of the mined txs, the autotask is being run by this relayer: https://testnet.ftmscan.com/address/0xe681a93ddab2092159e9995c37a8df36de8fb3ba

:computer: Environment

:memo:Details

:1234: Code to reproduce

I have the following code on my autotask:

const { ethers } = require("ethers");
const { DefenderRelayProvider, DefenderRelaySigner } = require('defender-relay-client/lib/ethers');

const { AutotaskClient } = require('defender-autotask-client'); 

// Autotask entrypoint
exports.handler = async function(credentials) {
  	const cred = {apiKey: credentials.secrets.RELAY_API_KEY, apiSecret: credentials.secrets.RELAY_SECRET_KEY};
    const client = new AutotaskClient({ apiKey: credentials.secrets.API_KEY, apiSecret: credentials.secrets.SECRET_KEY });
  
  // Initialize provider, signer, and contract instances
  const provider = new DefenderRelayProvider(cred);
  const signer = new DefenderRelaySigner(cred, provider);
  
  let x = {
  to: credentials.secrets.CONTRACT_ADDRESS,
  value: 0,
  data: "0xa3e1b2ad0000000000000000000000000000000000000000000000000000000000000001"
}
 
    const tx =  await signer.sendTransaction(x)
    console.log(`Sent tx: ${tx.hash}`);
  await tx.wait();
  
const myAutotask2 = {
  autotaskId: credentials.autotaskId,
  name: credentials.autotaskName,
  trigger: {
   type: 'schedule',
    cron: '*/80 * * * * *',
  },
  paused: false
};
  await client.update(myAutotask2);
}

Hi Nikk,

It sounds like you're having trouble with a cron expression that includes seconds (* * * * * *). Unfortunately, our system does not support cron expressions with a seconds field, even if the tool you used to generate the expression includes it.

Cron expressions typically consist of five fields that represent the minute, hour, day of the month, month, and day of the week, respectively. Our system follows this standard format, which means that any expression with sixth fields, one of them representing seconds, will not be recognized.

I also noticed that the tool that we recommend on the docs also supports fractions, so I will look into it to see if we support that or not and provide you with an answer later on today, but for now I will suggest using a cron expression for two minutes (*/2 * * * *)

Hi @LuisUrrutia thanks for the answer, I thought cron expressions with seconds were supported since neither the backend nor the UI raised issues with the expression given and they both accept it

I changed the cron expression to run every 1 minute ( */1 * * * * ) but also like this I encounter the same issue e.g https://testnet.ftmscan.com/tx/0x809b5c7d7167e090a6a0cd67486f255793e6450b612af58dbe4849a7f29acb8a and https://testnet.ftmscan.com/tx/0x46bb740960a0b90208e87a37f6de3170853fc2f71da3d79754b767cf85c9832e could there be other issues?

I now changed it to run every 2 minutes, I'll update the text with results on how it behaves once I collect a bit of data.

EDIT: also with 2 minutes intervals I get the same issue, https://testnet.ftmscan.com/tx/0x52512ad69e2322fa947979633c075ab3812dcc81ce44658f00f711d4c37d5e4a https://testnet.ftmscan.com/tx/0xff059057d5be188cfa000abd2a8d0ce9919cb910062c557619a9a97bc10b50b4