![]() ![]() Then use this path in the task's command, like: /path/to/venv/bin/python /home/myusername/myproject/myscript.py To get the path, run which python command in a Bash console, when the venv isĪctivated. Virtualenv called myenv like this: source virtualenvwrapper.sh & workon myenv & python /home/myusername/myproject/myscript.pyĪlternatively, you can use path to the python executable from the virtualenv. Sequence by separating them with &, so you could run a script using the In the example above, but you can also specify the default Python version justīy using the python command: python /home/myusername/myproject/myscript.py arg1 arg2 arg3īash commands can be comprised of several sub-commands, which can be run in To specify the Python command to use, so you could use an explicit version like If your script takes command-line arguments, you can pass them in. Just schedule this Bash command: python3.9 /home/myusername/myproject/myscript.py Python version is 3.10, but you want to run the script with 3.9, then you could ![]() Things to run in a more detailed way: Using a different Python version ¶ If what you enter into the form is not a path to a Python script, the scheduler (which you can specify on the "System image" tab of the "Account" page). If you do that, it will be run using your account's default Python version Python script: /home/myusername/myproject/myscript.py The easiest way to specify the code to run is to enter the full path to your Specifying what to run: the simple version ¶ Set the timing for the task using the fields at the start of the form. The details of how to set a task up are below. Then you can contact us to get it raised for your account.) (The limit of 20 tasks is "soft" - if you need more, within reason, In a paid account, you can create up to 20 tasks, and they can either run atĪ particular time every day, or every hour at a particular number of minutes.In a free account, you can set up one task to run at a particular time everyĭay.To set one up, go to the "Tasks" tab on your Scheduled tasks provide the ability to run your code periodically at a set time.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |