如何用crontab运行一个图形化界面的程序

crontab是linux中定时任务的

执行crontab -e可以编辑定时列表(export DISPLAY=:0 指定显示器或者export DISPLAY=localhost:0)

15 13 * * * export DISPLAY=:0 && gedit

 

root@ubuntu:~# crontab --help
crontab: invalid option -- '-'
crontab: usage error: unrecognized option
usage:    crontab [-u user] file
    crontab [ -u user ] [ -i ] { -e | -l | -r }
        (default operation is replace, per 1003.2)
    -e    (edit user's crontab)
    -l    (list user's crontab)
    -r    (delete user's crontab)
    -i    (prompt before deleting user's crontab)

 

posted @ 2014-04-11 13:22  马僧  阅读(2051)  评论(0编辑  收藏  举报