Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
osticket
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
docker
osticket
Commits
5807cd33
Commit
5807cd33
authored
12 years ago
by
Peter Rotich
Browse files
Options
Downloads
Patches
Plain Diff
Clobber object on auto-cron (Fixes false credit)
parent
62c9523a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scp/autocron.php
+7
-3
7 additions, 3 deletions
scp/autocron.php
with
7 additions
and
3 deletions
scp/autocron.php
+
7
−
3
View file @
5807cd33
...
...
@@ -30,13 +30,17 @@ ob_start(); //Keep the image output clean. Hide our dirt.
//TODO: Make cron DB based to allow for better time limits. Direct calls for now sucks big time.
//We DON'T want to spawn cron on every page load...we record the lastcroncall on the session per user
$sec
=
time
()
-
$_SESSION
[
'lastcroncall'
];
$caller
=
$thisstaff
->
getUserName
();
if
(
$sec
>
180
)
:
//user can call cron once every 3 minutes.
require_once
(
INCLUDE_DIR
.
'class.cron.php'
);
require_once
(
INCLUDE_DIR
.
'class.cron.php'
);
$thisstaff
=
null
;
//Clear staff obj to avoid false credit internal notes & auto-assignment
Cron
::
TicketMonitor
();
//Age tickets: We're going to age tickets regardless of cron settings.
if
(
$cfg
&&
$cfg
->
isAutoCronEnabled
())
{
//ONLY fetch tickets if autocron is enabled!
Cron
::
MailFetcher
();
//Fetch mail.
$ost
->
logDebug
(
'Auto Cron'
,
'Mail fetcher cron call ['
.
$
thisstaff
->
getUserName
()
.
']'
);
}
$ost
->
logDebug
(
'Auto Cron'
,
'Mail fetcher cron call ['
.
$
caller
.
']'
);
}
$_SESSION
[
'lastcroncall'
]
=
time
();
endif
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment