I am using the Retool Workflow to repeat some jobs. Some of the jobs need to be run every x seconds. I know that the cron does not natively support 'per x second' intervals, and the workaround is to use a sleep command(php - How to setup CRON job to run every 10 seconds in Linux? - Stack Overflow).
Currently, I am using the MySQL sleep command for this purpose. For example, for a job that needs to be run every 10 seconds, I use 'SELECT SLEEP(10)' and then copy and paste the job like below:
However, I am copying and pasting the job 6 times, which is totally against the DRY (Don't Repeat Yourself) principle. I haven't found a way to 'reuse' the query that needs to be run every x seconds.
Is there a more concise way to achieve this?