Forums

Scheduled task duration

Hello, I have noticed that bash script that is run by my scheduled task takes more time to execute than if I run it from the console. What is the reason behind that? It is not a problem for me, I am just curious to know what causes the difference of several minutes. Thanks.

It's most likely to be a result of server load. I see that you've set your scheduled task to run at 2am; lots of people have tasks set to run on the hour, so load spikes at those times, and everything runs slower. So if performance does become important in the future, and you don't have a hard requirement to run at a specific time, you'll almost certainly see a noticeable speedup if you choose a less popular time, like 02:07. In general, "round" times like on the hour, 15 minutes past, half past, and 45 past are popular and so things will run more slowly then.