Defender autotask shows success message but transaction is not written to blockchain

I am running a scheduled autotask job in defender. Defender autotask shows success message that autotask is run but transaction is not written to blockchain. Relayer has enough funds. How to allow an autotask to wait for txn to be submitted and then show success message ? Because without this daily jobs will go unnoticed as autotask is not throwing error in this case as txn is not submiited to blockchain.

:computer: Environment

Autotask

:memo:Details

:1234: Code to reproduce

@spalladino can you help me here

Hey @kbhargav5! We strongly suggest not to wait for the tx to be mined in the context of the autotask, since mining a tx could take several minutes, which go way over the autotask timeout. The relayer itself handles resubmissions and monitoring of the tx.

That said, last week (around the same time when you posted) we ran into an issue in our relayer infrastructure, triggered by the Rinkeby network being down (we'll be posting a post-mortem soon). The txs you were seeing that were not being mined could be related to that; but if you still see that your txs don't go through, let us know!

but am using BSC mainnet relayers for our autotasks. Txn is not see in bscscan but autotask showed success message. Also other issue I got to see is that, autotask is success and after some hours I see that txn got submitted. Can it be because of 'speed' param which I set to safeLow?

Yes, the Autotask succeeds once the transaction is successfully enqueued for being sent. The tx will then be mined, and the time it takes for getting mined depends on the speed and the congestion of the network. If you want to the tx to be processed faster, you can try with higher speeds.