Scheduling jobs after midnight

Colin Law clanlaw at gmail.com
Thu Dec 4 14:24:09 UTC 2014


On 4 December 2014 at 14:04, Matthew Sturdy <matt.sturdy at gmail.com> wrote:
> Hi Charles (don't forget to reply to the whole list)
>
> On 4 December 2014 at 11:54, Charles Irons <irons.charles at gmail.com> wrote:
>>
>> ********************
>> Thanks Matt and Colin
>>
>> 1.    Man cron has 160 lines of notes that I don't understand.
>>
>> 2.    What is the name to insert for Software Updater?
>>
>> 3.    How do I authenticate for Software Updater?
>>
>> 4.     How do I set a time to run?
>>
>> Sorry but I am not really competent with terminal operation.
>
>
>
> There are a lot of good tutorials on the internet that will help you more
> than I can in an email.  Here's a good starting place:
>
> https://help.ubuntu.com/community/CronHowto
>
> In short, "crontab" is the command you want to consult/edit the jobs.
>
> The jobs executed by the current user:
>
> crontab -l  # list them in the terminal
> crontab -e  # edit them in your default editor
>
>
> The jobs executed by superuser (which you will need to be in order to update
> apt)
>
> sudo crontab -l  # to list them
> sudo crontab -e  # to edit them
>
> Each command is entered as a new line.
> Leave a blank line at the end of the file (it should warn you if you don't
> do that)
>
> The format for each line is (each parameter separated by a single space):
>
> minute (0-59), hour (0-23, 0 = midnight), day (1-31), month (1-12), weekday
> (0-6, 0 = Sunday), command
>
> Example line to run a command at 01:00:
>
> 00 01 * * * /usr/bin/somedirectory/somecommand
>
> Hope that helps you get started.

Actually of course this will not work as upgrade needs root
privileges, so the command would have to go in root's crontab.  See
this link for various ways of auto upgrading, including the use of
cron-apt if you need to specify a particular time of day to do it.

https://help.ubuntu.com/community/AutoWeeklyUpdateHowTo

The link is specifically talking about weekly but I think it can be
used as a base for daily also.

Colin




More information about the ubuntu-users mailing list