opsi-product-updater syntax

Antworten
djm79
Beiträge: 65
Registriert: 04 Feb 2013, 14:03

opsi-product-updater syntax

Beitrag von djm79 »

I'm going to run the product updater as a cron job to keep my depots up to date with the main config server, my question is what is the correct syntax for the cronjob?

Would it be 30 13 0 0 1 opsi-product-updater -i to have it run on Sat at 1:30 pm?
Benutzeravatar
tobias
Beiträge: 1291
Registriert: 20 Aug 2008, 12:36
Wohnort: Braunschweig
Kontaktdaten:

Re: opsi-product-updater syntax

Beitrag von tobias »

Hi,

the 1 is Monday ;)
7 and 0 is Sunday
6 is Saturday
5 is Friday ....

Minute,Hour,day,month,weekday
djm79
Beiträge: 65
Registriert: 04 Feb 2013, 14:03

Re: opsi-product-updater syntax

Beitrag von djm79 »

After some digging around I found where I was going wrong with my crontab job. So I'll post this for other in case they need to schedule an opsi job. To find the location and path to input into you crontask run this command whereis "opsi command you want to run" and it will output the path to the command script and this will need to be entered after you select the time you want it to run. Example:

30 13 * * 6 /usr/bin/opsi-package-manager -i

This should run the opsi package manager to pull all the packages from the repository to the depot server. It will run at 1:30 pm on Sat every week.
djm79
Beiträge: 65
Registriert: 04 Feb 2013, 14:03

Re: opsi-product-updater syntax

Beitrag von djm79 »

Is there a way to stop the opsi-product-updater at a current time, so I want to start my sync on Sat and want to make sure that Monday morning it stops at 7:30 as the remote locations only have T1 connections to them and they can't operate with the sync running at the same time.

Thanks to the Opsi team this has been one of the best Open Source software journeys I have been on. :D
bmsoft
Beiträge: 43
Registriert: 02 Feb 2012, 12:30

Re: opsi-product-updater syntax

Beitrag von bmsoft »

Well, you can put a job into crontab that kills the product updater and the desired time. I would log and modify the times instead of killing the task. hth, lorenzo
Antworten