[SOLVED] Conky: Maintain Curl Output When Off-line?
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
You know it's possible that the data downloaded may be valid but not contain weather data (URL Moved?). In that case you will lose your conky display, but in that case you'll at least something's seriously wrong.
Now if you want to get fancy... you can just have it cache the old data and not overwrite it unless valid data is found. You can also only cache the weather info and not the whole page as I simply did above (however in doing so you can pull any cached data at any time, not just the temperature and conditions).
Sorry for the late post, I was away. So far, your suggested setup has worked with wifi on or off.
My conky interval is:
Code:
update_interval = 1.0,
But it would be appear by looking at the cached data that the interval for temperature retrieval is far greater, maybe 10+ minutes. That's okay, but I was wondering why. The curl command doesn't appear to have a built-in interval.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.