In your code there is no way to perform the required task, instead follow the below approach:
// Use function to perform the task.
function doTask () {
console.log("...");
}
// Perform task for the first time.
doTask();
// On interval do task.
setInterval(doTask, 2500);