Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
9
rated 0 times [  9] [ 0]  / answers: 1 / hits: 26952  / 3 Years ago, fri, august 6, 2021, 10:30:39

I have created a ruby script file that checks the connection present or not. For example checking port 22 is opened or not.



Firstly I tried with cron job as follows



@reboot find ${HOME}/my_app/check_conn.rb


But it is executing immediately after starting the system.



Now I have to run this script after 5 or 10 min.



How can I do this. Is there any other way for doing this.



Thanks in advance.


More From » cron

 Answers
4

Add sleep 600; to the beginning of your crontab command to make it wait for 600 seconds before proceeding to the next step.



Your new crontab command would look like



@reboot sleep 600; find ${HOME}/my_app/check_conn.rb


[#24320] Saturday, August 7, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
avilyexplor

Total Points: 20
Total Questions: 102
Total Answers: 120

Location: Maldives
Member since Mon, Jun 21, 2021
3 Years ago
;