起床闹钟自动播放音乐
背景:
预备每天早晨六点起床背单词。但是,很不幸手机上的闹钟都会被随手关掉,继续睡。为了解决这个问题,决定在电脑上设置一个定时播放音乐的任务,毕竟,要关闭电脑上的闹钟,是需要从床上爬起来的。嗯,说干就干。
技术:
- Python:pygame
- Linux 下crontab指令
- Mac:
步骤:
1、首先确认电脑上是否启用cron指令
$LaunchAgents sudo launchctl list | grep cron
- 0 com.vix.cron
果然,在里面,接下来检查配置项
$LaunchAgents locate com.vix.cron
WARNING: The locate database (/var/db/locate.database) does not exist.
To create the database, run the following com