Creating a Named Cron Job

cron

Solution

Well, just made a cronjob in Scheduler, and took a look at my crontab file, and it looked like this:

0 0 * * * ls >/dev/null 2>&1 # JOB_ID_1

Notice the `JOB_ID_1` at the end.

I went into `~/.gnome/gnome-scheduler/`, looked at the files there, and there was one named just `1` (as in the number "one") which had a bit of info, including the name

ver=3
title=Hello
desc=
nooutput=1

So, I made a second cronjob:

0 0 * * * ls -al >/dev/null 2>&1 # JOB_ID_2

Copied the file `1` to `2` to match the `JOB_ID_2`, changed the description, making the file as:

ver=3
title=This is a test
desc=
nooutput=1

Then I switched over to Gnome-Schedule, and it had added the cronjob, and had the name updated.

Follow the same steps, and you should be able to manually name any cronjob you want

Problem

How do you create a cron job from the command line, so that it shows up with a name in gnome-schedule? I know how to create a cron job using crontab. However, all my jobs show up with a blank name. I'd like to better document my jobs so I can easily identify them in gnome-schedule, or similar cron wrapper.

Original source