Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SCODOC_R6A06_1023
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xavier Moyon
SCODOC_R6A06_1023
Commits
ddfa0bbe
Commit
ddfa0bbe
authored
4 months ago
by
moyonxavier@gmail.com
Browse files
Options
Downloads
Patches
Plain Diff
Test - Mise en arriere plan du Schedule
parent
752a29a1
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/__init__.py
+14
-2
14 additions, 2 deletions
app/__init__.py
with
14 additions
and
2 deletions
app/__init__.py
+
14
−
2
View file @
ddfa0bbe
...
...
@@ -468,10 +468,22 @@ def create_app(config_class=DevConfig):
# Si la base n'a pas été upgradée (arrive durrant l'install)
# il se peut que la table scodoc_site_config n'existe pas encore.
pass
from
app.models.assiduitesSenderScheduler
import
starter
from
apscheduler.schedulers.background
import
BackgroundScheduler
scheduler
=
BackgroundScheduler
()
scheduler
.
add_job
(
job
,
'
cron
'
,
id
=
'
my_task1
'
,
minutes
=
1
)
scheduler
.
start
()
while
True
:
time
.
sleep
(
1
)
starter
()
return
app
def
job
():
#if datetime.datetime.today().weekday() == 0:
print
(
"
I
'
m working...
"
)
log
(
"
Le scheduler est là ou pas ??
"
)
def
set_sco_dept
(
scodoc_dept
:
str
,
open_cnx
=
True
):
"""
Set global g object to given dept and open db connection if needed
"""
...
...
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