Auto-update Stripped.csv in System Cron?

All things relating to the Nextion Screen(s)
Post Reply
M6XRM
Posts: 14
Joined: Sun Oct 04, 2020 9:36 pm

Auto-update Stripped.csv in System Cron?

Post by M6XRM »

Hi folks.

A couple of times every week, i go thru the process of manually updating the "Stripped.csv" database that feeds the operator info fields on our Nextion screens.
Although i have got it down pretty quick now, it's still a bit of a faff, and i was wondering if there was a way to get Pi-Star to fetch the .csv file i prepare as a daily event in System Cron? It would save me a bit of time for sure. All i would have to do is point a Cron job to where the new .csv is stored on the internet, and then write it to where it is stored on the Rpi...in this case /usr/local/etc/stripped.csv

Hope somebody may have an idea.

Cheers & 73...

Richie.
KG6RUT
Posts: 75
Joined: Thu Dec 24, 2020 7:28 pm

Re: Auto-update Stripped.csv in System Cron?

Post by KG6RUT »

maybe look here: /usr/local/sbin/pistar-daily.cron
KE7FNS
Pi-Star Team
Posts: 1913
Joined: Wed Apr 17, 2019 11:11 pm

Re: Auto-update Stripped.csv in System Cron?

Post by KE7FNS »

M6XRM wrote: Thu Feb 04, 2021 10:56 pm Although i have got it down pretty quick now, it's still a bit of a faff, and i was wondering if there was a way to get Pi-Star to fetch the .csv file i prepare as a daily event in System Cron?
You need to make sure whoever is hosting that file is ok with you pulling the data daily.
If someones previous actions are any indication of their future actions, then I predict the deletion and removal of access will happen at any moment. 7-11-2020.

"07/13/20 This Website Has Been Taken Down" ... again :lol:
M6XRM
Posts: 14
Joined: Sun Oct 04, 2020 9:36 pm

Re: Auto-update Stripped.csv in System Cron?

Post by M6XRM »

KE7FNS wrote: Fri Feb 05, 2021 12:39 am You need to make sure whoever is hosting that file is ok with you pulling the data daily.
Currently, i host my own .csv file which i pull down and edit from KF5IW's database weekly.

What i need to figure out is how to trigger the automation of Pi-star pulling to down and overwriting it.
Currently, with the manual way of doing it, i have to reboot at the end to implement the change also....so there is an extra challenge.

Was kind hoping someone would have said "Oh...i've done that" by now, and share their script and where to put it.
KG6RUT
Posts: 75
Joined: Thu Dec 24, 2020 7:28 pm

Re: Auto-update Stripped.csv in System Cron?

Post by KG6RUT »

When you figure it out let us know....I use his files too :)

I would think wget or curl would do the job...
KE7FNS
Pi-Star Team
Posts: 1913
Joined: Wed Apr 17, 2019 11:11 pm

Re: Auto-update Stripped.csv in System Cron?

Post by KE7FNS »

M6XRM wrote: Fri Feb 05, 2021 12:29 pm Currently, i host my own .csv file which i pull down and edit from KF5IW's database weekly.
Then make sure KF5IW is ok with you eating up some of his bandwidth allotment 4 times a month. All those downloads from who knows how many users add up, and add up quickly. Just ask Andy.
M6XRM wrote: Fri Feb 05, 2021 12:29 pm Currently, with the manual way of doing it, i have to reboot at the end to implement the change also....so there is an extra challenge.
Just restart the nextiondriver and mmdvmhost services in a script.

I also saw the latest Nextion Driver has some sort of control signal (SIGUSR1) that can be sent to force a database refresh without restarting, but I don't know how to activate it, theres no documentation. I haven't looked into it, but I'll bet theres some sort of program you can trigger and sent it SIGUSR1 and it will trigger it.
If someones previous actions are any indication of their future actions, then I predict the deletion and removal of access will happen at any moment. 7-11-2020.

"07/13/20 This Website Has Been Taken Down" ... again :lol:
f1rmb
Posts: 26
Joined: Thu Feb 21, 2019 12:12 pm

Re: Auto-update Stripped.csv in System Cron?

Post by f1rmb »

Hi,

kill -USR1 <pid>


It works also with killall.


Cheers.
---
Daniel
KE7FNS
Pi-Star Team
Posts: 1913
Joined: Wed Apr 17, 2019 11:11 pm

Re: Auto-update Stripped.csv in System Cron?

Post by KE7FNS »

f1rmb wrote: Fri Feb 05, 2021 8:25 pm kill -USR1 <pid>

It works also with killall.
That makes total sense.

Thanks. :D
If someones previous actions are any indication of their future actions, then I predict the deletion and removal of access will happen at any moment. 7-11-2020.

"07/13/20 This Website Has Been Taken Down" ... again :lol:
f1rmb
Posts: 26
Joined: Thu Feb 21, 2019 12:12 pm

Re: Auto-update Stripped.csv in System Cron?

Post by f1rmb »

KE7FNS wrote: Fri Feb 05, 2021 8:40 pm That makes total sense.

Thanks. :D
You're welcome ;-)


Cheers.
---
Daniel
Post Reply