1. Add a new Environment Variable name = JUPYTER_HOME and value= C:\Users\UserName\Documents\Notebooks under System Propoerties -> Environment Variables.. -> User Variable.
2. Add the location of Jupyter script as the Path in the Environment Variable.
Today I would like to discuss regarding script automation using Crontab. Let’s start first with what I meant by Script Automation?- Let’s say You want to run a script after every five minutes. How you can do that? Running the script after every five minutes manually? Well, that’s where script automation comes.
Now, it’s turn about Crontab. So for this, I would like to tell you to use Google!!!.
First, Write a script. A script that will measure the memory usage and if the memory usage is greater than a certain value then it’ll send an email.
So here is the script:
Let’s assume we have a config.ini file like below:
What we want to do is to read these value through a batch file. So let’s create a batch file named “test.bat” with following commands:
@echo off for /f "tokens=1,2 delims==" %%a in (config.ini) do ( if %%a==username set username=%%b if %%a==password set password=%%b ) echo %username% echo %password%
keep in mind that, the path of the config.ini file should be updated according to your file structure. In this case both of the files are at the same level.