How to run AppleScript in a Crontab?
Apple recommends using launchd which actually runs cron tasks for MacOS. You can still use crontab -e to edit your crontab, but if you want a one-liner:

(crontab -l 2&gt;/dev/null; echo "01 10 * * * osascript /Users/Jhon/Desktop/somescript.scpt") | crontab - ; crontab -l


See this answer for much more useful details:

How can I configure my computer to run an AppleScript at a specific time? Caveat: without using iCal