Hi,
I had wrote an action in an controller.
It`s about getting some data realtime and insert into a database.
The code is fine,but I need to refresh through browser(exactly,trigger by a ajax call).
Is there any method I can do the cron job every ten minutes and just between am9:00 throygh pm5:00 each day?
My server is CentOS 6.5 + apache.
Please give me some hints, many thanks.
jkofsky
(Jkofsky)
June 3, 2014, 3:06am
2
forpizinmind:
Hi,
I had wrote an action in an controller.
It`s about getting some data realtime and insert into a database.
The code is fine,but I need to refresh through browser(exactly,trigger by a ajax call).
Is there any method I can do the cron job every ten minutes and just between am9:00 throygh pm5:00 each day?
My server is CentOS 6.5 + apache.
Please give me some hints, many thanks.
Through the browser/ajax call: Ajax/JQuery has a setInterval() that can trigger every X amount of time. I sounds more like you need to change you action code to console app and run in a cron job to load the data into the db, then setInterval() to update the browser.