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

CLI Support / Crontab #1721

Open
philm001 opened this issue May 13, 2024 · 8 comments
Open

CLI Support / Crontab #1721

philm001 opened this issue May 13, 2024 · 8 comments
Labels
Feedback needs user response, may be closed after timeout without a response Heisenbug a problem that is not reproducible but random (non-deterministic) Scheduling cron, anacron etc.

Comments

@philm001
Copy link

Hello,

I am using BiT v 1.4.1-1. I have it setup to run via the crontab. When I run the check-config command and it says that it installed on the crontab, But when I run the command crontab -e nothing is there.

@buhtz
Copy link
Member

buhtz commented May 13, 2024

Hello Phillip,

Thank you for taking the time to report the bug and providing the
details. I appreciate your feedback, will investigate the issue,
and work on a solution to the best of my ability.

How do you "setup to run via the crontab"? You used the GUI? What is the title of your ticket about? There you use "CLI".

Please post the output of crontab -l.

There are several places where a crontab can be located. Please have a look at

1. /etc/crontab
2. /var/spool/cron/crontabs/
3. /etc/cron.d/

Best regards,
Christian

@buhtz buhtz changed the title CLI Support CLI Support / Crontab May 13, 2024
@buhtz buhtz added Scheduling cron, anacron etc. Feedback needs user response, may be closed after timeout without a response labels May 13, 2024
@buhtz
Copy link
Member

buhtz commented May 28, 2024

Hello Phillip,
do you have any additional information about this issue for us? Otherwise I need to close the issue.

@buhtz
Copy link
Member

buhtz commented May 31, 2024

Are you on an arch based distro? Please post the output of ps -A | grep -i cron.

@philm001
Copy link
Author

philm001 commented May 31, 2024

Hello everyone, I apologize for going silent for so long. I haven't had a chance to respond and since the issue is closed, I would like to re-open this issue since I am still having this issue of implementing the auto back up.

Here is a link to the original issue: #1721

Per the feedback, I have checked the following locations and noted their outputs below:

/etc/crontab

 /etc/crontab: system-wide crontab
 Unlike any other crontab you don't have to run the crontab
 command to install the new version when you edit this file
 and files in /etc/cron.d. These files also have username fields,
 that none of the other crontabs do.

SHELL=/bin/sh
 You can also override PATH, but by default, newer versions inherit it from the environment
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

 Example of job definition:
 .---------------- minute (0 - 59)
 |  .------------- hour (0 - 23)
 |  |  .---------- day of month (1 - 31)
 |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
 |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
 |  |  |  |  |
 *  *  *  *  * user-name command to be executed
17 *    * * *   root    cd / && run-parts --report /etc/cron.hourly
25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6    * * 7   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6    1 * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )

/var/spool/cron/crontabs/

Empty

/etc/cron.d/

Empty

Output from crontab -l

Back In Time system entry, this will be edited by the gui:
Please don't delete these two lines, or all custom backintime entries will be deleted next time you call the gui options!

The output of the command is as follows:

903 ?        00:00:00 cron
   3164 ?        00:00:00 cron
1526986 ?        00:00:00 nextcloud-cron

@philm001
Copy link
Author

I am running the latest Ubuntu server LTS edition

@buhtz
Copy link
Member

buhtz commented May 31, 2024

Can you explain your problem and what you try to achive please. It is not clear to me.

Your crontab is empty. Why do you expect that there should be an entry?
How do you setup BIT scheduling?

@philm001
Copy link
Author

Sure so this is a snippet from my profile. As you can see, I am attempting to setup daily backups at 1 AM in the morning

  GNU nano 6.2                                                                 /etc/backintime/config                                                                           
profile1.snapshots.automatic_backup_day=1
profile1.snapshots.automatic_backup_mode=20
profile1.snapshots.automatic_backup_time=0
profile1.snapshots.automatic_backup_weekday=7

And the cron tab is not updated to implement this. Is there some other command I need to run from CLI that will generate it?

@buhtz
Copy link
Member

buhtz commented May 31, 2024

You edited this config file directly via nano?

This is not supported and you do this on your own risk. I assume somethings in your edit is not valid so BIT is not able to create a crontab entry for that profile. I suggest to install BIT with GUI on a virtual machine, create a similar profile and then compare the config files.

You could also check the debug output --debug.

Usually BIT re-crates the crontab entries on every start for all existing profiles. no need for an extra step.

@buhtz buhtz added this to the Upcoming release (1.5.0) milestone Jun 5, 2024
@buhtz buhtz added the Heisenbug a problem that is not reproducible but random (non-deterministic) label Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feedback needs user response, may be closed after timeout without a response Heisenbug a problem that is not reproducible but random (non-deterministic) Scheduling cron, anacron etc.
Projects
None yet
Development

No branches or pull requests

2 participants