Solve the problem that os.system wouldn't take effect. It turns out that was caused by the crontab itself. The crontab joy description has to include DISPLAY=0.0 to let the crontab know which display it's running on