Has there been any indications yet on whether Tasks is coming to the API? Can see a million use cases so just wondering if any timeline has been flagged.
The whole point of API is programmatic access. I’m sure you can figure out how to call the API for AI any time you want in your software.
Google result for 'python script cron job
To run a Python script as a cron job, follow these steps:
- Create your Python script:
# my_script.pyimport datetimedef main(): with open("cron_log.txt", "a") as log_file: log_file.write(f"Script executed at: {datetime.datetime.now()}\n")if __name__ == "__main__": main()
- Open the crontab file:
Open a terminal and run:
crontab -e
This will open the crontab file in your default text editor.
- Add your cron job:
Add a line to the crontab file with the following syntax:
* * * * * /path/to/python /path/to/your/script.py
- Replace /path/to/python with the path to your Python interpreter (e.g., /usr/bin/python3).
- Replace /path/to/your/script.py with the path to your Python script.
Example (Run the script every 5 minutes):
*/5 * * * * /usr/bin/python3 /home/user/my_script.py
- Save and exit:
Save the crontab file and exit the text editor.
- Verify the cron job:
Run the command:
crontab -l
This will list all your scheduled cron jobs.
Important Considerations:
- Absolute Paths: Use absolute paths for both the Python interpreter and your script.
- Environment Variables: If your script relies on environment variables, ensure they are set correctly in the crontab file.
- Output Redirection: If you want to capture the output of your script, redirect it to a file:
*/5 * * * * /usr/bin/python3 /home/user/my_script.py > /home/user/cron_output.log 2>&1
- Error Handling: Add error handling to your script to prevent unexpected issues.
Generative AI is experimental.
Now you say this, this is incredibly obvious!! Consider my face red here. I should add I’m more working with devs, rather than a dev myself, just by way of excuses!
Now have those developers run the jobs scheduled by thousands of your AI customers in your database through your UI. That is, if you want to provide more AI per subscription than humanly possible.
One thing to note is that many people like yourself are just starting to realize the capabilities of automation through AI.
There are definitely a million use cases for it.
It’s very exciting!
As of now, Notion hasn’t announced plans to add a dedicated “Tasks” feature to their API or shared a timeline. For updates, keep an eye on their Twitter (@NotionAPI) or Slack community.
Or look into apache airflow to remember mum’s birthday (strange btw. to tell openAI when friends and family have their birthdays)…