PCWX App Discussion...

Status
Not open for further replies.

kuma-mon

Supremacy Member
Joined
Apr 16, 2017
Messages
8,677
Reaction score
2,994
Hi,

Yup, sorry i won't be pushing any more updates unless there's a critical bug that needs to be fixed. I believe that I have already provided a lot of features into the app for the hwz community.
 

kuma-mon

Supremacy Member
Joined
Apr 16, 2017
Messages
8,677
Reaction score
2,994
can't you just set a cronjob to restart every 15minutes?

Hi,

I must have an active ssh connection to my cloud server, aws instance. If my home internet resets itself or disconnects, the connection will be gone and the aws will log out of itself. Have to sign in again. So even if i set a cron job, it would be pointless because the cronjob wont be trigggered. Do correct me if i'm wrong though.
 

szeli

Arch-Supremacy Member
Joined
Mar 24, 2003
Messages
19,629
Reaction score
2,274
Hi,

I must have an active ssh connection to my cloud server, aws instance. If my home internet resets itself or disconnects, the connection will be gone and the aws will log out of itself. Have to sign in again. So even if i set a cron job, it would be pointless because the cronjob wont be trigggered. Do correct me if i'm wrong though.

??? u mean u restart e whole server instance when yr pager crashes? :s22:
 

kuma-mon

Supremacy Member
Joined
Apr 16, 2017
Messages
8,677
Reaction score
2,994
??? u mean u restart e whole server instance when yr pager crashes? :s22:

Hi,

Sry maybe i nvr explain clearly enough. A lot of technical words here, very hard to explain in layman terms.

Okay my pager rarely crashes due to errors/bugs, most of the time it stops functioning is because the active ssh connection to the aws instance disconnects due to my home internet resetting itself and so on. Singtel always likes to reset the dhcp service. Once it disconnects, the script stops running because the aws instance will auto logout itself. So any script, even cronjob wont help because im logout of the instance. So i have to login the instance again and restart the pager. Maybe my understanding is wrong here.

The script should always continue running even when i face this disconnection issue. I don't really know how to let the script continue running in the background even when there's any disconnection. Any sexperts here can advise?
 
Last edited:

szeli

Arch-Supremacy Member
Joined
Mar 24, 2003
Messages
19,629
Reaction score
2,274
Hi,

Sry maybe i nvr explain clearly enough. A lot of technical words here, very hard to explain in layman terms.

Okay my pager rarely crashes due to errors/bugs, most of the time it stops functioning is because the active ssh connection to the aws instance disconnects due to my home internet resetting itself and so on. Singtel always likes to reset the dhcp service. Once it disconnects, the script stops running because the aws instance will auto logout itself. So any script, even cronjob wont help because im logout of the instance. So i have to login the instance again and restart the pager. Maybe my understanding is wrong here.

The script should always continue running even when i face this disconnection issue. I don't really know how to let the script continue running in the background even when there's any disconnection. Any sexperts here can advise?

oh so u r interfacing something from yr home network to e AWS instance over e SSH connection? maybe u can explain in detail how yr script works.
 

yamakazi51

Master Member
Joined
Jan 19, 2003
Messages
4,896
Reaction score
1,240
Why do you need full time ssh connection from home to the instance? Why can't everything on that instance? Maybe something is wrong in the architecture design somewhere
 

Ah-Pin-Kor

Great Supremacy Member
Joined
Apr 2, 2008
Messages
54,433
Reaction score
1,334
Hi,

Sry maybe i nvr explain clearly enough. A lot of technical words here, very hard to explain in layman terms.

Okay my pager rarely crashes due to errors/bugs, most of the time it stops functioning is because the active ssh connection to the aws instance disconnects due to my home internet resetting itself and so on. Singtel always likes to reset the dhcp service. Once it disconnects, the script stops running because the aws instance will auto logout itself. So any script, even cronjob wont help because im logout of the instance. So i have to login the instance again and restart the pager. Maybe my understanding is wrong here.

The script should always continue running even when i face this disconnection issue. I don't really know how to let the script continue running in the background even when there's any disconnection. Any sexperts here can advise?
You definitely should not need to maintain an ssh connection to keep a script running.

See this link:
https://www.maketecheasier.com/run-bash-commands-background-linux/

You can also use the "screen" utility to run your script. You can attach and detach from different "screens".
https://www.rackaid.com/blog/linux-screen-tutorial-and-how-to/
 

davidktw

Arch-Supremacy Member
Joined
Apr 15, 2010
Messages
13,391
Reaction score
1,180
You definitely should not need to maintain an ssh connection to keep a script running.

See this link:
https://www.maketecheasier.com/run-bash-commands-background-linux/

You can also use the "screen" utility to run your script. You can attach and detach from different "screens".
https://www.rackaid.com/blog/linux-screen-tutorial-and-how-to/

This works, but it is not necessary. That is not how daemon processes should be started. There are 2 main ways of doing so.

One is create a service in the linux and have the init process start it up during system start up or manually invoke the service to start up.

The other way is basically create a cron job which will periodically check if the daemon is started using simple techniques like PS for the process and grep for certain keywords or check against a lock file or pid file. Startup the script using the cron if the process is not running.

You don’t need to resort to using a virtual TTY such as screen for such purposes.
 

BlackCube

Great Supremacy Member
Joined
Jul 18, 2003
Messages
71,182
Reaction score
832
Abit ot but I always wonder what's the impact on performance and what not when u run a Cron job to do some check such as whether a service is started, if not start it.

Lets say u do it to run every min. What's the impact like? Say the service is crucial and should not be down. So this Cron bascially keep checking and brings it back in case it is down.
 

Ah-Pin-Kor

Great Supremacy Member
Joined
Apr 2, 2008
Messages
54,433
Reaction score
1,334
This works, but it is not necessary. That is not how daemon processes should be started. There are 2 main ways of doing so.

One is create a service in the linux and have the init process start it up during system start up or manually invoke the service to start up.

The other way is basically create a cron job which will periodically check if the daemon is started using simple techniques like PS for the process and grep for certain keywords or check against a lock file or pid file. Startup the script using the cron if the process is not running.

You don*********t need to resort to using a virtual TTY such as screen for such purposes.
yes agree with you about starting daemons. Kumamon seems to have problem running his script in cron so i didnt want to confuse him bout rc scripts and systemd. Let him get his script running without an ssh connection first then fix the cronjob. Probably due to his script not sourcing his env. Using supervisord to start and monitor daemons is better than checking nanually with cronjob.
 

skai_11

Arch-Supremacy Member
Joined
Nov 2, 2005
Messages
11,820
Reaction score
1,064
Got new updates meh?

Suddenly realised the format/GUI is different when replying quote.
 

juventusfc27

Arch-Supremacy Member
Joined
Feb 24, 2006
Messages
13,625
Reaction score
0
hi kuma-mon,

is it possible to implement these 2 new functions in your app?

1) delete post function

2) the ability to scroll freely to any page when im at a particular page. lets say im in a topic with 30 pages. im at page 21, i should be able to scroll freely from page 21 to page 1 or page 21 to page 30. currently if i jump to page 21, i can ONLY view page 21 and not other pages

the refresh ability to check for new posts also buggy, otherwise i think it's a very good app u have created.
 

kuma-mon

Supremacy Member
Joined
Apr 16, 2017
Messages
8,677
Reaction score
2,994
Got new updates meh?

Suddenly realised the format/GUI is different when replying quote.

Hi, perhaps u have enabled the editable quote in settings? I didnt push any updates.

hi kuma-mon,

is it possible to implement these 2 new functions in your app?

1) delete post function

2) the ability to scroll freely to any page when im at a particular page. lets say im in a topic with 30 pages. im at page 21, i should be able to scroll freely from page 21 to page 1 or page 21 to page 30. currently if i jump to page 21, i can ONLY view page 21 and not other pages

the refresh ability to check for new posts also buggy, otherwise i think it's a very good app u have created.

Hi, sorry but i wont be pushing any more updates for the app. The jump page function is buggy, by right should be able to scroll to other pages. Sometimes it works, sometimes not. Same goes for checking new posts function. Only way is to exit out the thread and go back in to view latest posts. It will resume to where u left off.
 
Last edited:

BlackCube

Great Supremacy Member
Joined
Jul 18, 2003
Messages
71,182
Reaction score
832
hi kuma-mon,

is it possible to implement these 2 new functions in your app?

1) delete post function

2) the ability to scroll freely to any page when im at a particular page. lets say im in a topic with 30 pages. im at page 21, i should be able to scroll freely from page 21 to page 1 or page 21 to page 30. currently if i jump to page 21, i can ONLY view page 21 and not other pages

the refresh ability to check for new posts also buggy, otherwise i think it's a very good app u have created.

This app has been abandoned. No need to request anything even though it's a hug for point 2.
 
Status
Not open for further replies.
Important Forum Advisory Note
This forum is moderated by volunteer moderators who will react only to members' feedback on posts. Moderators are not employees or representatives of HWZ. Forum members and moderators are responsible for their own posts.

Please refer to our Community Guidelines and Standards, Terms of Service and Member T&Cs for more information.
Top