karvp Posted April 25, 2024 Posted April 25, 2024 Hello, I would like to know if I can schedule a Python task to be executed at certain times. Thanks. Quote
wolstech Posted April 25, 2024 Posted April 25, 2024 You should be able to do this by using the scheduled tasks option in plesk and having it call your .py file. Quote
karvp Posted April 26, 2024 Author Posted April 26, 2024 (edited) I got this when trying to run a simple hello world: Btw, if I add the shebang: Edited April 26, 2024 by karvp Quote
wolstech Posted April 27, 2024 Posted April 27, 2024 You can only call files in your home directory due to a chroot, so you can't actually access the Python binary. The easiest way to make this work is to put together a script in the cgi-bin folder that works when accessed in your browser, and then schedule it to be called using the fetch web URL feature. 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.