0

I'd like to schedule a weekly backup with Crontab but I've never used it before so I wanted to start with a simple command to test it, like open a text file with gedit.

I followed this guide:
https://help.ubuntu.com/community/CronHowto

sudo crontab -e

I get my file in the terminal and I add this:

m h  dom mon dow  command
34 12    * * *    /usr/bin/gedit /home/KEN/Desktop/ImaTXT

It was 12: 32 when I saved and installed this new crontab:

crontab: installing new crontab

I checked that it was saved:

sudo crontab -l

Two minutes pass and nothing gets opened.

What am I doing wrong?

Thanks Kevy, it worked.

IDK
  • 593

1 Answers1

2

You should have specified $DISPLAY environmental variable and user (may be ken in your case).

$ sudo crontab -e -u user

m h dom mon dow command
34 12 * * * export DISPLAY=:0 && /usr/bin/gedit /home/KEN/Desktop/ImaTXT
kevy
  • 668