I used crontab -e
, getting the below, which I then edited (adding the final line):
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h dom mon dow command
@reboot guake
But guake still doesn't run on startup. Why?
I also tried @reboot ./script
, and the script won't run. Both work in the terminal usually.
guake
binary? cron jobs run with a minimalPATH
, so binaries anywhere except /bin or /usr/bin will not be found. Canguake
run before you've logged in? Does it have any other environment dependencies (cron jobs run with a very minimal environment)? Have you tried capturing its output (and errors) by adding something like>/tmp/guake.log 2>&1
to the command? Check the canonical question over on ServerFault for more ideas.