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

Redesign Schedule section in the GUI #1449

Open
buhtz opened this issue Jun 16, 2023 · 6 comments
Open

Redesign Schedule section in the GUI #1449

buhtz opened this issue Jun 16, 2023 · 6 comments
Assignees
Labels
Cosmetics appearance, icons, themes Discussion decision or consensus needed Feature requests a new feature HELP-WANTED Used by 24pullrequests.com to suggest issues

Comments

@buhtz
Copy link
Member

buhtz commented Jun 16, 2023

Blocked by:

This is based on PR #1196 where it comes up that it might be a good idea to re-design the part of the GUI responsible for scheduling.

Current situation

Currently it is just a drop down menu in the "General" tab of the "Settings" dialog of the profile settings.
image

Problems

  • Now way to add "time restrictions" like hours where the job never should run. This is was PR GUI: Improve scheduling section (was: Adding execution time restriction) #1196 originally was about.
  • Cron and Anacron like schedule options are mixed. To complex and hard to understand for some users now aware of the difference between cron and anacron. Some user might not understand that some jobs are missing when using "Every 6 hours" (cronlike).
  • Anacron is named in the dialog. But for real BIT do not use anacron but just simulate the anacron like behavior.
  • An "export" option is missing to create a user defined crontab line.

Proposal

This is a quick and dirty (not finished) proposal in form of a GUI MockUp (used draw.io for that). I attached the original file if you like to edit.

  • I tried to reflect nearly the same behavior as in the current Schedule GUI. Exceptions are noted below.
  • Removed scheduling from "General" tab and created an extra tab "Schedule" for it.
  • Removed all crontab-based options (e.g. "Every 6 hours") because of the assumption that most users do misunderstand them and don't know that it means specific time points (e.g. 0:00, 6:00, 12:00, ...) and they would miss them if the machine isn't running.
  • Technical details (cron, anacron, etc pp) could be added as tooltips.
  • The tab now has 5 sections where only one of them can be active.
    1. "Run peridically after" is related to the anacron-like behavior. It means timespans.
    2. "On reboot" is cron and using @reboot. The "delay" is new and would be realized with a sleep n && backintime like cron command.
    3. "Every day/week/month/year" is related to cron and results in usual crontab lines. Of the 4 variants only one is visible depending on the value selected in the dropdown menu.
    4. "When drive get connected" use udev.
    5. "Expert/cronline" is new and opens the opportunity to advanced users creating their own crontab line. Maybe this could be somehow improved with 5 separated line edits etc.
  • The solution should be separated into multiple PR's of course.
  • See Qt classes QDateTimeEdit, QTimeEdit

Here are some variants and annotations in the picture.
backintime_schedule_mockup

To see how it could look like for real here is a version without annotations just using the week-variant in the third section.
backintime_schedule_mockup - simple week

Here is the original DrawIO file (ZIP because of Microsoft GitHub. You need to unpack before open with drawio).
backintime_schedule_mockup.drawio.zip

Related:

@buhtz buhtz self-assigned this Jun 16, 2023
@buhtz buhtz added Feature requests a new feature Discussion decision or consensus needed Cosmetics appearance, icons, themes labels Jun 16, 2023
@emtiu
Copy link
Member

emtiu commented Jun 16, 2023

Great work! Here's a few minor improvements in wording, and making refinements for the different scenarios optional with checkboxes:
Screenshot_20230616_122125

@aryoda
Copy link
Contributor

aryoda commented Jun 18, 2023

@buhtz Amazing work, your mock-up GUI! This makes the available options much more visible to end users than hiding then in a combo box (as is now).

I think an anacron-alike scheduling option to create overdue snapshots when the computer is switched on would be great too but we have to discuss then first

  • what exactly the current anacron scheduling implementation is in Bit is doing (the option is named "repeatedly (anacron)" - whatever this is)
  • how reliable it is (there are other issues related to anchron)
  • if we should restrict the anacron scheduling to pure "take overdue snapshots when computer is switched on/user is logging on" or to support all anacron features.

No need to discuss this right now IMHO (let's wait until we plan the implementation...?!)

@buhtz
Copy link
Member Author

buhtz commented Jun 19, 2023

Moin moin,

thanks for your thoughts.

  • what exactly the current anacron scheduling implementation is in Bit is doing (the option is named "repeatedly (anacron)" - whatever this is)

Michael explained that on the mailing list and I remember I have heard that somehow in the past also; maybe from Germar. When an anacron-like schedule is configured BIT add a crontab line that starts it every 15 minutes. Then BIT checks itself if it is time to run a job or not. If not it just close itself again. Not totaly elegant but it seems to works.
How all this is implemented in the back is of course another issue. Today there is also the option of systemd timers, etc pp. BIT could react flexibel depending on what the system offers; e.g. some OS don't have systemd.

Maybe @Germar can explain why anacron is not used.

  • how reliable it is (there are other issues related to anchron)

I couldn't find and I'm not aware of Issues related to (ana)cron.

  • if we should restrict the anacron scheduling to pure "take overdue snapshots when computer is switched on/user is logging on" or to support all anacron features.

I shouldn't use the term "anacron" anymore. I don't know about other anacron features. I just like the idea of configuring timespan and that "anacron" catch the job up when the timespan elapsed.

When communicating with the user I also wouldn't use technical terms like "cron" or "anacron". I only would describe the behaviour in the GUI not the technology behind.

@makoehr
Copy link

makoehr commented Jun 19, 2023

The possibility to edit the full cron line is very nice, this allows a high flexibility.
For me it is also fine to be able to specify the cron line in the config file directly (not via the GUI). This might ease everything. The important thing for me is to have a fairly good control over the cron line.

@buhtz
Copy link
Member Author

buhtz commented Jun 28, 2023

Just as a note. The possible options are hard coded in the config.
image

@buhtz
Copy link
Member Author

buhtz commented Jul 18, 2023

Take into account the discussion in #1479 which is about how to handle and configure the retry-behavior in case of errors and unsuccesfull snapshots.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cosmetics appearance, icons, themes Discussion decision or consensus needed Feature requests a new feature HELP-WANTED Used by 24pullrequests.com to suggest issues
Projects
None yet
Development

No branches or pull requests

4 participants