0

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.

7
  • Where is the guake binary? cron jobs run with a minimal PATH, so binaries anywhere except /bin or /usr/bin will not be found. Can guake 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. Mar 8, 2020 at 7:43
  • I just want to run guake on startup. This is what the guide said to do.
    – apg
    Mar 8, 2020 at 7:45
  • Which guide? I tried googling, but didn't see anything relevant. Mar 8, 2020 at 7:48
  • Second answer here askubuntu.com/questions/814/how-to-run-scripts-on-start-up
    – apg
    Mar 8, 2020 at 7:50
  • 2
    That's talking about shell scripts, not interactive GUI programs. (And it's common for shell scripts to fail due to cron's minimal environment.) Try the answers to: How to make Guake start at login? Mar 8, 2020 at 8:17

0

You must log in to answer this question.

Browse other questions tagged .