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

Bibsched running tasks at fixed time #996

Closed
invenio-developers opened this issue Apr 30, 2014 · 7 comments
Closed

Bibsched running tasks at fixed time #996

invenio-developers opened this issue Apr 30, 2014 · 7 comments

Comments

@invenio-developers
Copy link

Originally by adeiana (@Osso) on 2012-04-05

I have updated the get_runtime function to be able to run oaiharvest at 4:00 sharp.

@kaplun
Copy link
Member

kaplun commented Apr 30, 2014

Originally on 2012-04-05

Hi Alessio,

this ticket is kind of implementing the request in ticket #896, that was closed as duplicate of #794. However it's true that this is implementing a different concept, namely to have no time drift at all.

I have to comments on your patch:

  • is it Python 2.4 friendly (in particular WRT the different time Vs. date strptime functions)?
  • in your implementation, when the var argument to get_datetime is not matched by the regular expression (and contains therefore a regular date), you completely ignore it:
-        date = time.strptime(var, format_string)
-        date = time.strftime(format_string, date)
+        date = date.strftime(format_string)

while before it was used to build the date value. In this way you are changing the semantic of get_datetime even when you are not specifying the new now argument.

@invenio-developers
Copy link
Author

Originally by adeiana (@Osso) on 2012-04-05

It works fine with python2.4.

I may have taken a shortcut in my understanding and I just assumed it was a fallback in case the timeshift was invalid.
There is really not point in changing the else branch and we can just keep the old one.

@kaplun
Copy link
Member

kaplun commented Apr 30, 2014

Originally on 2012-04-12

It's available on the public branch adeiana/bibsched-fixedtime

@kaplun
Copy link
Member

kaplun commented Apr 30, 2014

Originally on 2012-04-12

It's actually cleaned and improved in sam/bibsched-nostop

@invenio-developers
Copy link
Author

Originally by Alessio Deiana alessio.deiana@cern.ch on 2012-04-18

In [a5d560f]:

#CommitTicketReference repository="" revision="a5d560f11c70ef4ca1667a99f4090b807dd8332a"
BibSched: handles task to be run at fixed times

- introduce new --fixed-time CLI argument for bibtasks that allows
  admins to require that recurrent tasks are re-scheduled using
  exact multiple of the sleeping-time with respect to the current time.
  (closes #996)

Co-authored-by: Samuele Kaplun <samuele.kaplun@cern.ch>

@invenio-developers
Copy link
Author

Originally by Alessio Deiana alessio.deiana@cern.ch on 2012-08-09

In a5d560f:

#CommitTicketReference repository="" revision="a5d560f11c70ef4ca1667a99f4090b807dd8332a"
BibSched: handles task to be run at fixed times

- introduce new --fixed-time CLI argument for bibtasks that allows
  admins to require that recurrent tasks are re-scheduled using
  exact multiple of the sleeping-time with respect to the current time.
  (closes #996)

Co-authored-by: Samuele Kaplun <samuele.kaplun@cern.ch>

1 similar comment
@invenio-developers
Copy link
Author

Originally by Alessio Deiana alessio.deiana@cern.ch on 2012-08-09

In a5d560f:

#CommitTicketReference repository="" revision="a5d560f11c70ef4ca1667a99f4090b807dd8332a"
BibSched: handles task to be run at fixed times

- introduce new --fixed-time CLI argument for bibtasks that allows
  admins to require that recurrent tasks are re-scheduled using
  exact multiple of the sleeping-time with respect to the current time.
  (closes #996)

Co-authored-by: Samuele Kaplun <samuele.kaplun@cern.ch>

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

No branches or pull requests

2 participants