Skip to content
GitLab
Erkunden
Anmelden
Registrieren
Primärnavigation
Suchen oder aufrufen …
Projekt
Cron
Verwalten
Aktivität
Mitglieder
Labels
Planen
Tickets
5
Ticketübersichten
Meilensteine
Wiki
Code
Merge Requests
0
Repository
Branch
Commits
Tags
Repository-Diagramm
Revisionen vergleichen
Build
Pipelines
Aufgaben
Pipeline-Zeitpläne
Artefakte
Bereitstellung
Releases
Betreiben
Umgebungen
Überwachen
Vorfälle
Service-Desk
Analysieren
Wertschöpfungskettenanalyse
Mitwirkenden-Analyse
CI/CD-Analyse
Repository-Analysen
Hilfe
Hilfe
Support
GitLab-Dokumentation
GitLab-Pläne vergleichen
Community-Forum
Zu GitLab beitragen
Feedback geben
Tastenkürzel
?
Code-Schnipsel
Gruppen
Projekte
Show more breadcrumbs
QUIQQER
Cron
Commits
35c06789
Commit
35c06789
erstellt
vor 9 Jahren
von
Henning Leutz
Dateien durchsuchen
Optionen
Downloads
Patches
Einfaches Diff
psr2
Übergeordneter
c0d021f6
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
Änderungen
2
Leerzeichenänderungen ausblenden
Inline
Nebeneinander
2 geänderte Dateien
lib/QUI/Cron/Manager.php
+42
-41
42 Ergänzungen, 41 Löschungen
lib/QUI/Cron/Manager.php
lib/QUI/Cron/QuiqqerCrons.php
+8
-8
8 Ergänzungen, 8 Löschungen
lib/QUI/Cron/QuiqqerCrons.php
werden angezeigt
mit
50 Ergänzungen
und
49 Löschungen
lib/QUI/Cron/Manager.php
+
42
−
41
Zeige Datei @
35c06789
...
...
@@ -23,13 +23,14 @@ class Manager
/**
* Add a cron
*
* @param String $cron - Name of the Cron
* @param String $min - On which minute should it start
* @param String $hour - On which hour should it start
* @param String $day - On which day should it start
* @param String $month - On which month should it start
* @param String $dayOfWeek - day of week (0 - 6) (0 to 6 are Sunday to Saturday, or use names; 7 is Sunday, the same as 0)
* @param Array $params - Cron Parameter
* @param string $cron - Name of the Cron
* @param string $min - On which minute should it start
* @param string $hour - On which hour should it start
* @param string $day - On which day should it start
* @param string $month - On which month should it start
* @param string $dayOfWeek - day of week (0 - 6) (0 to 6 are Sunday to Saturday,
* or use names; 7 is Sunday, the same as 0)
* @param array $params - Cron Parameter
*
* @throws QUI\Exception
*/
...
...
@@ -37,7 +38,7 @@ class Manager
{
Permission
::
checkPermission
(
'quiqqer.cron.add'
);
if
(
!
$this
->
_
cronExists
(
$cron
))
{
if
(
!
$this
->
cronExists
(
$cron
))
{
throw
new
QUI\Exception
(
QUI
::
getLocale
()
->
get
(
'quiqqer/cron'
,
'exception.cron.1001'
),
1001
...
...
@@ -73,14 +74,14 @@ class Manager
/**
* Edit the cron
*
* @param
S
tring $cron - Name of the Cron
* @param
I
nteger $cronId
* @param
S
tring $min
* @param
S
tring $hour
* @param
S
tring $day
* @param
S
tring $month
* @param
S
tring $dayOfWeek
* @param
A
rray $params
* @param
s
tring $cron - Name of the Cron
* @param
i
nteger $cronId
* @param
s
tring $min
* @param
s
tring $hour
* @param
s
tring $day
* @param
s
tring $month
* @param
s
tring $dayOfWeek
* @param
a
rray $params
*
* @throws QUI\Exception
*/
...
...
@@ -96,7 +97,7 @@ class Manager
)
{
Permission
::
checkPermission
(
'quiqqer.cron.edit'
);
if
(
!
$this
->
_
cronExists
(
$cron
))
{
if
(
!
$this
->
cronExists
(
$cron
))
{
throw
new
QUI\Exception
(
QUI
::
getLocale
()
->
get
(
'quiqqer/cron'
,
'exception.cron.1002'
),
1002
...
...
@@ -139,7 +140,7 @@ class Manager
/**
* activate a cron in the cron list
*
* @param
I
nteger $cronId - ID of the cron
* @param
i
nteger $cronId - ID of the cron
*/
public
function
activateCron
(
$cronId
)
{
...
...
@@ -155,7 +156,7 @@ class Manager
/**
* deactivate a cron in the cron list
*
* @param
I
nteger $cronId - ID of the cron
* @param
i
nteger $cronId - ID of the cron
*/
public
function
deactivateCron
(
$cronId
)
{
...
...
@@ -171,7 +172,7 @@ class Manager
/**
* Delete the crons
*
* @param
A
rray $ids - Array of the Cron-Ids
* @param
a
rray $ids - Array of the Cron-Ids
*/
public
function
deleteCronIds
(
$ids
)
{
...
...
@@ -250,7 +251,7 @@ class Manager
/**
* Execute a cron
*
* @param
I
nteger $cronId - ID of the cron
* @param
i
nteger $cronId - ID of the cron
*
* @return \QUI\Cron\Manager
* @throws QUI\Exception
...
...
@@ -290,7 +291,7 @@ class Manager
)
);
QUI
::
getDataBase
()
->
insert
(
self
::
T
ableHistory
(),
array
(
QUI
::
getDataBase
()
->
insert
(
self
::
t
ableHistory
(),
array
(
'cronid'
=>
$cronId
,
'lastexec'
=>
date
(
'Y-m-d H:i:s'
),
'uid'
=>
QUI
::
getUserBySession
()
->
getId
()
...
...
@@ -309,7 +310,7 @@ class Manager
/**
* Return the Crons which are available and from other Plugins provided
*
* @return
A
rray
* @return
a
rray
*/
public
function
getAvailableCrons
()
{
...
...
@@ -338,9 +339,9 @@ class Manager
/**
* Return the data of a inserted cron
*
* @param
I
nteger $cronId - ID of the Cron
* @param
i
nteger $cronId - ID of the Cron
*
* @return
A
rray|false - Cron Data
* @return
a
rray|false - Cron Data
*/
public
function
getCronById
(
$cronId
)
{
...
...
@@ -363,9 +364,9 @@ class Manager
* Return the data of a specific cron from the available cron list
* This cron is not in the cron list
*
* @param
S
tring $cron - Name of the Cron
* @param
s
tring $cron - Name of the Cron
*
* @return
A
rray|false - Cron Data
* @return
a
rray|false - Cron Data
*/
public
function
getCronData
(
$cron
)
{
...
...
@@ -399,7 +400,7 @@ class Manager
}
$data
=
QUI
::
getDataBase
()
->
fetch
(
array
(
'from'
=>
self
::
T
ableHistory
(),
'from'
=>
self
::
t
ableHistory
(),
'limit'
=>
$limit
,
'order'
=>
$order
));
...
...
@@ -430,7 +431,6 @@ class Manager
$entry
[
'username'
]
=
$Users
->
get
(
$entry
[
'uid'
])
->
getName
();
}
catch
(
QUI\Exception
$Exception
)
{
}
$result
[]
=
$entry
;
...
...
@@ -442,12 +442,12 @@ class Manager
/**
* Return the history count, how many history entries exist
*
* @return
I
nteger
* @return
i
nteger
*/
public
function
getHistoryCount
()
{
$result
=
QUI
::
getDataBase
()
->
fetch
(
array
(
'from'
=>
self
::
T
ableHistory
(),
'from'
=>
self
::
t
ableHistory
(),
'count'
=>
'id'
));
...
...
@@ -457,7 +457,7 @@ class Manager
/**
* Return the cron list
*
* @return
A
rray
* @return
a
rray
*/
public
function
getList
()
{
...
...
@@ -473,7 +473,7 @@ class Manager
*
* @return Bool
*/
protected
function
_
cronExists
(
$cron
)
protected
function
cronExists
(
$cron
)
{
return
$this
->
getCronData
(
$cron
)
===
false
?
false
:
true
;
}
...
...
@@ -485,9 +485,9 @@ class Manager
/**
* Return the cron tabe
*
* @return
S
tring
* @return
s
tring
*/
static
function
T
able
()
public
static
function
T
ABLE
()
{
return
QUI_DB_PRFX
.
'cron'
;
}
...
...
@@ -495,9 +495,9 @@ class Manager
/**
* Return the cron tabe
*
* @return
S
tring
* @return
s
tring
*/
static
function
T
ableHistory
()
public
static
function
t
ableHistory
()
{
return
QUI_DB_PRFX
.
'cron_history'
;
}
...
...
@@ -505,11 +505,11 @@ class Manager
/**
* Return the Crons from a XML File
*
* @param
S
tring $file
* @param
s
tring $file
*
* @return
A
rray
* @return
a
rray
*/
static
function
getCronsFromFile
(
$file
)
public
static
function
getCronsFromFile
(
$file
)
{
if
(
!
file_exists
(
$file
))
{
return
array
();
...
...
@@ -554,6 +554,7 @@ class Manager
if
(
$Params
->
length
)
{
foreach
(
$Params
as
$Param
)
{
/* @var $Param \DOMElement */
$params
[]
=
array
(
'name'
=>
$Param
->
getAttribute
(
'name'
),
'type'
=>
$Param
->
getAttribute
(
'type'
)
...
...
@@ -577,7 +578,7 @@ class Manager
*
* @param String $message - Message
*/
static
function
log
(
$message
)
public
static
function
log
(
$message
)
{
QUI\System\Log
::
addInfo
(
$message
,
array
(),
'cron'
);
}
...
...
This diff is collapsed.
Zum Erweitern klicken.
lib/QUI/Cron/QuiqqerCrons.php
+
8
−
8
Zeige Datei @
35c06789
...
...
@@ -18,7 +18,7 @@ class QuiqqerCrons
/**
* Clear the temp folder
*/
static
function
clearTempFolder
()
public
static
function
clearTempFolder
()
{
$Temp
=
QUI
::
getTemp
();
$Temp
->
clear
();
...
...
@@ -27,7 +27,7 @@ class QuiqqerCrons
/**
* Clear complete cache
*/
static
function
clearCache
()
public
static
function
clearCache
()
{
QUI\Cache\Manager
::
clearAll
();
}
...
...
@@ -35,7 +35,7 @@ class QuiqqerCrons
/**
* Purge the cache
*/
static
function
purgeCache
()
public
static
function
purgeCache
()
{
QUI\Cache\Manager
::
purge
();
}
...
...
@@ -43,7 +43,7 @@ class QuiqqerCrons
/**
* Clear the media cache of the administration
*/
static
function
clearAdminMediaCache
()
public
static
function
clearAdminMediaCache
()
{
QUI\Utils\System\File
::
unlink
(
VAR_DIR
.
'cache/admin/media/'
);
}
...
...
@@ -52,12 +52,12 @@ class QuiqqerCrons
* Check project sites release dates
* Activate or deactivate sites
*
* @param
A
rray $params - Cron Parameter
* @param
a
rray $params - Cron Parameter
* @param \QUI\Cron\Manager $CronManager
*
* @throws QUI\Exception
*/
static
function
realeaseDate
(
$params
,
$CronManager
)
public
static
function
realeaseDate
(
$params
,
$CronManager
)
{
if
(
!
isset
(
$params
[
'project'
]))
{
throw
new
QUI\Exception
(
'Need a project parameter to search release dates'
);
...
...
@@ -159,7 +159,7 @@ class QuiqqerCrons
* @param array $params
* @param \QUI\Cron\Manager $CronManager
*/
static
function
mailQueue
(
$params
,
$CronManager
)
public
static
function
mailQueue
(
$params
,
$CronManager
)
{
$MailQueue
=
new
QUI\Mail\Queue
();
...
...
@@ -167,4 +167,4 @@ class QuiqqerCrons
$MailQueue
->
send
();
}
}
}
\ No newline at end of file
}
This diff is collapsed.
Zum Erweitern klicken.
Vorschau
0%
Wiederholen
oder
Neue Datei anhängen
.
Abbrechen
You are about to add
0
people
to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Kommentar speichern
Abbrechen
Bitte
registrieren
oder
Anmelden
zum Kommentieren