Forum Discussion
How can I schedule a Python script to run daily (including Sundays) even when my laptop is off?
- 1 year ago
If your code has no local dependecies (i.e. you don't need any data/files from the laptop), you could consider migrating the code to a Fabric notebook which will run Python. You've posted in a Fabric Community Forum so this is the most likely topic of advice here.
There are tonnes of learning resources about notebooks - starting here;
How to use notebooks - Microsoft Fabric | Microsoft LearnThere is a free trial of Fabric available - go beyond that and you'll be into a paid capacity though.
First question is; is your Python code local to your laptop or inside a Fabric notebook?
If your code is local, then you'll need some external resource, like renting a server (as ahmetyilmaz says) or migrating the code to Fabric. This is out of scope for the rest of this reply.
If your code is in a Fabric notebook and you're wanting to schedule the notebook, you can either create a schedule directly within the notebook or you can make the notebook part of a pipeline (using the Notebook activity) and schedule that pipeline.
Example;
I could write a notebook that queries a weather API to get the day's forecast and persist this data in a Fabric table. I could then schedule this to run at 1am to ensure I always had a daily forecast.
If this reply helps, please consider Accepting as a Solution to help others find it more easily.
Python code is local to my laptop.Give me something other than renting a server.
- spencer_sa1 year agoImpactful Individual
If your code has no local dependecies (i.e. you don't need any data/files from the laptop), you could consider migrating the code to a Fabric notebook which will run Python. You've posted in a Fabric Community Forum so this is the most likely topic of advice here.
There are tonnes of learning resources about notebooks - starting here;
How to use notebooks - Microsoft Fabric | Microsoft LearnThere is a free trial of Fabric available - go beyond that and you'll be into a paid capacity though.