Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cronjob as alternative to service #58

Closed
proffapt opened this issue Sep 5, 2023 · 5 comments · Fixed by #65
Closed

Cronjob as alternative to service #58

proffapt opened this issue Sep 5, 2023 · 5 comments · Fixed by #65

Comments

@proffapt
Copy link
Member

proffapt commented Sep 5, 2023

Implement mftp as a cronjob along with a continuously running service in infinite loop.

Basic idea

  • mftp cronjob disable
  • mftp cronjob enable
  • mftp cronjob enable 30

Why this? and Why not only this?

Cronjob will be best for:

  • Internal Servers.. not requiring OTP for login
  • Small devices like rpis.. limited in resources

Service will be best for:

  • External Servers.. requiring OTP for login
  • Having enough resources
@lakshz
Copy link
Contributor

lakshz commented Sep 23, 2023

Hi @proffapt, I can work on this.

@proffapt
Copy link
Member Author

Great, then let me know if you need some kind of help

@lakshz
Copy link
Contributor

lakshz commented Sep 26, 2023

@proffapt , needed some clarity on this. This is what I've understood:
Currently, the mftp.py script runs on an infinite loop and continuously monitors the CDC noticeboard. For cronjob, instead of an infinite loop, I just need to send new notices after a scheduled time. So, I'll remove that infinite loop in a new script and add a bash script to create a crontab.

Is this flow correct, on high level?

@proffapt
Copy link
Member Author

mftp-as-a-service.sh

  1. Will have those cronjob comamnds:
    mftp cronjob enable..
  2. Another file will be created without infinite loop
  3. That file will be added into cronjob, there will be default time of 2 mins if the user doesn't provide

@lakshz
Copy link
Contributor

lakshz commented Sep 28, 2023

got it thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants