Hi Everyone,
I am having an issue where I scheduled a job in Jupyter Lab and the job executed, but it appears to have ran more than 1 time (I can provide the specific output job id if that helps). I’m worried that I did something wrong, or there is a behind the scenes issue when I delete a job, then make a new job with the same name that the job runs more than one time.
Here is the output results view from today:
Anyone experience this before?
1 Like
Hmm, I haven’t seen that issue yet but it is possible there is a bug. Could you open an issue on the jupyter-scheduler repo and so that team can investigate?
1 Like
Ok will do that now, thank you for the response.
Issue #476 opened for this now.
opened 01:46PM - 25 Jan 24 UTC
bug
## Description
I scheduled a script to run at 12:00 PM on each weekday. When t… he next scheduled time came around, the job appears to have executed 3 different times with their run times overlapping each other. I noticed this because my script is setup to have an automatic email sent and I received 3 copies of the email all with different results from executing my script. Then, I checked the jupyter lab "notebook job" tab and saw 3 results of "completed" for the same script. However in my "notebook job definitions" area, the script was only scheduled 1 time.
I'm wondering if the environment selected to run the job in affected this. I scheduled it to run in the "base" environment (anaconda3) but I actually built the script in "projects" environment. Also, I had previously scheduled this job, but then made revisions to the script. So I deleted the scheduled job, and then scheduled it again. Could this have affected the results?
![image](https://github.com/jupyter-server/jupyter-scheduler/assets/100488887/6166f3e5-81ae-460b-81d2-6d2daf91a198)
Here is my revised scheduled job (sorry, this screenshot is taken from AFTER the original issue showed up and I made a new schedule before opening this ticket).
![image](https://github.com/jupyter-server/jupyter-scheduler/assets/100488887/e4a5d2f8-9552-4155-8da4-d10104c79229)
## Reproduce
I'm not actually sure how to reproduce the issue. All I did was schedule the script to run and this issue happened.
## Expected behavior
I wanted the job to only run 1 time at the scheduled time. My script includes an automatic email sent out and I expected to only see 1 email and 1 completed job in the "completed job" tab.
## Context
- Operating System and version:
Brower = Chrome
- Jupyter Server version: 2.10.0
- Jupyter Lab version: 4.0.8
- Jupyter Notebook version: 7.0.6
<details><summary>Troubleshoot Output</summary>
<pre>
Paste the output from running `jupyter troubleshoot` from the command line here.
You may want to sanitize the paths in the output.
</pre>
</details>
(I tried to paste my entire result but I got an error that body is too long). I have manually trimmed some info out of this result.
(base) C:\>jupyter troubleshoot
$PATH:
sys.path:
C:\Users\XXXXX\AppData\Local\anaconda3\Scripts
C:\Users\XXXXX\AppData\Local\anaconda3\python311.zip
C:\Users\XXXXX\AppData\Local\anaconda3\DLLs
C:\Users\XXXXX\AppData\Local\anaconda3\Lib
C:\Users\XXXXX\AppData\Local\anaconda3
C:\Users\XXXXX\AppData\Roaming\Python\Python311\site-packages
C:\Users\XXXXX\AppData\Roaming\Python\Python311\site-packages\win32
C:\Users\XXXXX\AppData\Roaming\Python\Python311\site-packages\win32\lib
C:\Users\XXXXX\AppData\Roaming\Python\Python311\site-packages\Pythonwin
C:\Users\XXXXX\AppData\Local\anaconda3\Lib\site-packages
C:\Users\XXXXX\AppData\Local\anaconda3\Lib\site-packages\win32
C:\Users\XXXXX\AppData\Local\anaconda3\Lib\site-packages\win32\lib
C:\Users\XXXXX\AppData\Local\anaconda3\Lib\site-packages\Pythonwin
sys.executable:
C:\Users\XXXXX\AppData\Local\anaconda3\python.exe
sys.version:
3.11.5 | packaged by Anaconda, Inc. | (main, Sep 11 2023, 13:26:23) [MSC v.1916 64 bit (AMD64)]
platform.platform():
Windows-10-10.0.19045-SP0
where jupyter:
C:\Users\XXXXX\AppData\Local\anaconda3\Scripts\jupyter.exe
[Jupyter Troubleshoot Results.docx](https://github.com/jupyter-server/jupyter-scheduler/files/14052847/Jupyter.Troubleshoot.Results.docx)
Hi guys, I have the similar problem. And it seems that the number of executions increases with each complete restart of the environment. Perhaps when the session is closed, the thread continues to work and when a new session is started, another one is created.
Did you try run the code “jupyter server list” to verify how many servers are currently running? That helped me to better identify the cause of the issue.
2 Likes
Thank you @Tall_Gibbs this halped a lot.
Now it is clear that when running Jupyterlab from the Anaconda panel, parallel servers are created with their own scheduler in each.
When finished, you must close the server before closing the tab or stop the instances through the terminal. In my case I had to clear the /runtime directory.
1 Like