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

offlineimap.timer doesn't work #469

Closed
knezi opened this issue May 20, 2017 · 5 comments
Closed

offlineimap.timer doesn't work #469

knezi opened this issue May 20, 2017 · 5 comments
Assignees
Labels

Comments

@knezi
Copy link

knezi commented May 20, 2017

If I simply activate the provided timer by:

systemctl --user enable offlineimap.timer
systemctl --user start offlineimap.timer

Then systemctl --user list-timers lists this timer, but all times (next, past) are N/A. It works if I add this line into the timer:

OnBootSec=1m

So I guess there needs to be specified first time of run and then the repetition.

@benutzer193
Copy link
Contributor

benutzer193 commented May 20, 2017

Thanks @knezi, you are correct, the timer has to be initialized the first time for OnUnitInactiveSec= to work.

@nicolas33 nicolas33 added bug and removed question labels May 20, 2017
@nicolas33
Copy link
Member

May I ask why this is required?

nicolas33 pushed a commit that referenced this issue May 20, 2017
Github-ref: #469
Reported-by: Jan Knížek <jk@janknizek.cz>
Signed-off-by: benutzer193 <registerbn@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
@nicolas33
Copy link
Member

Patch applied, BTW.

@knezi
Copy link
Author

knezi commented May 21, 2017

@nicolas33 because OnUnitInactiveSec specificies how many seconds after the last run next run will be executed. When you boot, there's no last run and therefore the timer won't be triggered. This is why you add OnBootSec, which will run it once after boot and then it will be run repeatedly thanks to the first parameter.

@nicolas33
Copy link
Member

Ok, thank you.

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

No branches or pull requests

3 participants