You are not logged in.
Hi.
Im trying to execute an gtk app through cron but doesn't seem to work. Here is the content of my ~/.crontab file
#export DISPLAY=:0.0
# Execute backup reminder once a month
* * * * * /home/n3t/bin/backUpReminder/backup_reminder --display=:0.0Any idea ?
Last edited by netpumber (2014-04-11 16:00:58)
Offline
The crontab file (which is not the one you mentioned) should be edited through executing
crontab -e(Refer to man crontab)
“First principle, Clarice. Simplicity” – Dr. Hannibal Lecter
Offline
Also your interval syntax seems wrong.
@monthly is equivalent to
0 0 1 * * /path/to/scriptThis runs the script on the first of every month at midnight. If the machine is not up at that time, the job will be missed.
Last edited by ball (2014-04-11 13:23:02)
Offline
~/.crontab seems a weird place for the crontab.
Does this script work if you run it manually?
Offline
First of all, if i run crontab -e , it opens a file with vim (?) from /tmp/crontab.4R2Ww0 that i cannot edit. I press insert but doesn't work.
Also your interval syntax seems wrong.
@monthly is equivalent to
Yes i know that. I change it to test if it will run in the next minute.
~/.crontab seems a weird place for the crontab.
Does this script work if you run it manually?
Hmm.. how to run it manually? i cannot understand.
Offline
First of all, if i run crontab -e , it opens a file with vim (?) from /tmp/crontab.4R2Ww0 that i cannot edit. I press insert but doesn't work.
Try another editor, e.g. nano:
Either
VISUAL=nano crontab -eor
EDITOR=nano crontab -eshould work. (You should set these environment variables permanently to the editor of your liking.)
Edit the file, save with Ctrl-o, exit with Ctrl-x. On my machine crontab then writes the file into /var/spool/cron/
Hmm.. how to run it manually? i cannot understand.
Just run the script, that you referenced in the crontab file, manually from the command line to be sure that the script doesn't contain errors...
Last edited by ball (2014-04-11 15:11:31)
Offline
Hmm ok now it works
Thank you very much
Offline
What did you do to make it work? Other people may learn something from your solution.
Offline
the ~/.crontab file doesn't need to exist there. If you run VISUAL=nano crontab -e it creates a file in /var/spool/cron and that's all.
In my i situation i think the problem was the editor.
Offline
If you run into some problems, you can always check if the wiki can help:
https://wiki.archlinux.org/index.php/Cr … ult_editor
https://wiki.archlinux.org/index.php/Vi … d_quitting
Offline