Little Girl's Mostly Linux Blog

Cron

Cron

This page was last updated on July 18, 2009.

See the Wikipedia Cron page for an indepth explanation of what Cron is and how to use it.

Add a cron job

  1. Open a terminal window and type:
  2. crontab -e

    Crontab creates a temporary file and opens the nano editor.

  3. Type in the cron job:
  4. 30 14 * * * env DISPLAY=:0.0 /usr/bin/kaffeine

    This example will run Kaffeine every day at 2:30 p.m. The env DISPLAY=:0.0 part is only required for GUI applications.

  5. Save the file by pressing the Ctrl and o (that’s the letter – not a zero) keys at the same time.
  6. Type in either a file name or a path and file name and press the Enter key.
  7. Exit the nano editor by pressing the Ctrl and x keys at the same time. Crontab will merge your changes into your crontab.

Look at your cron job(s)

  1. Open a terminal window and type:
  2. crontab -l

Edit your cron job(s)

  1. Open a terminal window and type:
  2. crontab -e
  3. Type in the changes you wish to make to the file.
  4. Save the file by pressing the Ctrl and o keys at the same time.
  5. Type in either a file name or a path and file name and press the Enter key.
  6. Exit the nano editor by pressing the Ctrl and x keys at the same time. Crontab will merge your changes into your crontab.

Remove your cron job(s)

  1. Open a terminal window and type:
  2. crontab -r


Obligatory Happy Ending

And they all lived happily ever after. The end.

3 Comments »

  1. Kaffeine seems to crash if I login and start it while the crib is running it. Could you please share how you work with this?

    Comment by Anonymous — November 23, 2019 @ 5:42 pm

  2. I meant. The recording that is running stops…

    Comment by Anonymous — November 23, 2019 @ 5:43 pm

    • Oh, I’m sorry. This page is ten years old and I haven’t used Kubuntu or Kaffeine in years (although I plan to go back to it when my current operating system is no longer supported). That cron job worked back then, but maybe something has changed in cron or Kaffeine or Kubuntu that’s affecting it. Have you tested it several times to make sure it’s related to the cron job and doesn’t happen when the cron job isn’t in effect? If so, you might want to file a bug report with the cron and/or Kaffeine developers.

      Comment by mostlylinux — November 24, 2019 @ 8:47 am


RSS feed for comments on this post. TrackBack URI

Comment:

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: