question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Run job and get data from DB

See original GitHub issue

Hi @viniciuschiele Thanks for your flask-apscheduler, it makes my life easier 😄

Btw I have an issue while running the scheduler job. The job it self works perfectly until I tried to access my db model it throws error

RuntimeError: application not registered on db instance and no application bound to current context

any solution how to use the db instance and app context to the job views?

Thanks

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6

github_iconTop GitHub Comments

5reactions
erwinyusrizalcommented, Jan 9, 2017

@Quanr if you need a request context you can use with scheduler.app.test_request_context(): otherwise you can use app_context with scheduler.app.app_context():

1reaction
erwinyusrizalcommented, May 24, 2017

@wck821829906 Use either request context with scheduler.app.test_request_context():

or

app context with scheduler.app.app_context():

Read more comments on GitHub >

github_iconTop Results From Across the Web

Querying SQL Server Agent Job History Data
Use these handy TSQL queries to query SQL Server Agent job history and to make better sense of the data and for better...
Read more >
Run job in agent based on table data - DBA Stack Exchange
Basically, first I want to check a table, and if the table is not empty then start the job. If it is empty,...
Read more >
Extracting monitoring data from the operations database - IBM
Run SQL queries against the operations database to extract monitoring data. ... Extract the names of all the jobs running on a specific...
Read more >
SQL Server - Schedule Jobs Getting data from one database ...
My schedule job resides in TestOne and Inserts into MyTable and the values has to come from TestTwo.MyTable. Is there any example that's ......
Read more >
sp_start_job (Transact-SQL) - SQL Server - Microsoft Learn
Instructs SQL Server Agent to execute a job immediately. ... the permissions of these roles, see SQL Server Agent Fixed Database Roles.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found