2

Through an application I have made with Tkinter, I'm trying to add a command to run a script every week. When the program is closed the command should be in forever place.

I've sifted through the documentation on cron, but there doesn't seem to be a way to edit the crontab without using the shell. Also I've looked through the 'at' command, but that only seems to run once.

My question is - How can one create a weekly recurring task by issuing a single command in Python on Unix?

If not with only 1 command, can I use multiple?

4

1 回答 1

1

在大多数现代 Linux 发行版(如 Debian 或 Ubuntu)中,您可以将可执行文件(如 shell 脚本或符号链接)添加到 /etc/cron.weekly 中,它将每周自动运行一次。这是使用anacron命令,这在当今相当普遍。

于 2012-07-27T15:55:44.033 回答