Question
Does the way you write cronjob affect the performance?
Hi guys, I am not so good in understanding the depth of cronjob. So, I have a question regarding cronjob.
Please look at the below cronjobs and kindly tell me if they would affect the performance or the performance will be same in both cases
1st case
* * * * * executer /path/to/job1
* * * * * executer /path/to/job2
* * * * * executer /path/to/job3
* * * * * executer /path/to/job4
* * * * * (sleep 30; executer /path/to/job1)
* * * * * (sleep 30; executer /path/to/job2)
* * * * * (sleep 30; executer /path/to/job3)
* * * * * (sleep 30; executer /path/to/job4)
2nd case
- * * * * executer /path/to/job1
- * * * * (sleep 30; executer /path/to/job1)
- * * * * executer /path/to/job2
- * * * * (sleep 30; executer /path/to/job2)
- * * * * executer /path/to/job3
- * * * * (sleep 30; executer /path/to/job3)
- * * * * executer /path/to/job3
- * * * * (sleep 30; executer /path/to/job3)
Will the performance on both be same or they can be different?
Thank you very much in advance for your help guys.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×