I have create an Online Application.In every 15 minutes interval it automatically generates results and save to database. It works fine when the website is open; But it does not work at all when the website is closed. How can I always make my website online even no one open it???.Please give me Solution. Thank You
Asked
Active
Viewed 209 times
-3
-
1Without knowing much about the architecture, that kind of thing is typically handled by a server service or database job. – Jake Hargus Sep 04 '14 at 16:53
-
What do you mean always online? If your webserver's uptime is good it is always online? Please clarify your question. We need more details otherwise your question will turn a downvote fest and nobody give you an answer. – HddnTHA Sep 04 '14 at 16:53
2 Answers
0
I want to introduce you to CRON
What is cron?
Cron is the name of program that enables unix users to execute commands or scripts (groups of commands) automatically at a specified time/date. It is normally used for sys admin commands, like makewhatis, which builds a search database for the man -k command, or for running a backup script, but can be used for anything. A common use for it today is connecting to the internet and downloading your email.
# * * * * * command to execute
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ └───── day of week (0 - 6) (0 to 6 are Sunday to Saturday, or use names; 7 is Sunday, the same as 0)
# │ │ │ └────────── month (1 - 12)
# │ │ └─────────────── day of month (1 - 31)
# │ └──────────────────── hour (0 - 23)
# └───────────────────────── min (0 - 59)
Here is how you set it up to run every 15 minute
*/15 * * * * your_command_or_whatever
|
|--> `*/15` would imply every 15 minutes.
there are many great resources on cron
Configure cron job to run every 15 minutes on Jenkins