-
Notifications
You must be signed in to change notification settings - Fork 19
Description
Hi,
Environment
Jupyterlab version: 3.0.6
Description
I found this issue when I click the "Show cronjobs" button.
Reproduce steps
The issue is randomly occured, to reproduce it:
- add several jobs
- delete some of them
Workaround
I found it was caused by the missing of blank line between the job and the previous variables in the system crontab file:
If I try to add a blank line, the issue is fixed.
I think there may be some bug when calling the /delete api (which delete some extra blank lines) or the regex pattern matching the schedule (but when I test the pattern outside the jupyterlab, it seems correct).
My current solution is to change the regex pattern matching the schedule in the get /list API:
schedule_match = re.search(r"(((\d+,)+\d+|(\d+(\/|-)\d+)|\d+|\*) ?){5,7}", str(job))
schedule = schedule_match.group(0)
instead of above code:
schedule = str(job.slices)
With this fix the issue is gone, but I'm not sure it causes other issue.
Please comment if anything wrong, thank you.😊