Scheduling jobs after midnight
iceblink
iceblink at seti.nl
Thu Dec 4 14:43:56 UTC 2014
On 2014-12-04 15:04, Matthew Sturdy 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 [1]
>
> 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.
>
> Matt
>
Here is some more useful information:
https://help.ubuntu.com/community/AutoWeeklyUpdateHowTo
It sounds like you want to use unattended automatic upgrades.
You can install it by "sudo apt-get install unattended-upgrades"
By default it runs along with your daily cron, which i believe starts at
6AM.
But of course this is Linux so you can change anything you want :)
For instance you can change the run time for all the daily cron jobs to
00:30 by editing the run time for cron.daily by "sudo crontab -e".
Or you can change the timing for only the automatic-upgrades job. Find
the file in /etc/cron.daily/ and move it to another location. Then add a
line in crontab that runs the script from the new location at the
desired time.
Best regards,
Patrick
More information about the ubuntu-users
mailing list