Can I use “WAITFOR DELAY” to execute a procedureHow can I remove duplicate rows?How can foreign key constraints be temporarily disabled using T-SQL?Insert results of a stored procedure into a temporary tableFunction vs. Stored Procedure in SQL ServerHow can I do an UPDATE statement with JOIN in SQL?Getting value from stored procedure in another stored procedureAccess Stored Procedure Parameters with Dynamic SQLTransact-SQL stored procedure with conditional “AND” logicMerge stored procedure with datatype conversionsSQL Stored Procedure if statement with bit

What is the name for the average of the largest and the smallest values in a given data set?

Do pedestrians imitate auto traffic?

Do Australia and New Zealand have a travel ban on Somalis (like Wikipedia says)?

Is it legal for a supermarket to refuse to sell an adult beer if an adult with them doesn’t have their ID?

Should I have shared a document with a former employee?

"Je suis petite, moi?", purpose of the "moi"?

Improving an O(N^2) function (all entities iterating over all other entities)

When designing an adventure, how can I ensure a continuous player experience in a setting that's likely to favor TPKs?

What is a Romeo Word™?

Ethernet to USB adapter on Linux

What is this green alien supposed to be on the American covers of the "Hitchhiker's Guide to the Galaxy"?

Why do jet engines sound louder on the ground than inside the aircraft?

How much solution to fill Paterson Universal Tank when developing film?

Who determines when road center lines are solid or dashed?

Why is an object not defined as identity morphism?

Will the internet speed decrease on second router if there are multiple devices connected to primary router?

Why teach C using scanf without talking about command line arguments?

Inscriptio Labyrinthica

Which failed attempts have there been to find a contradiction in ZFC or ZF?

Are more expensive chains/casettes more quiet?

Three Subway Escalators

Is it possible to have a career in SciComp without contributing to arms research?

Why do space operations use "nominal" to mean "working correctly"?

I have found a mistake on someone's code published online: what is the protocol?



Can I use “WAITFOR DELAY” to execute a procedure


How can I remove duplicate rows?How can foreign key constraints be temporarily disabled using T-SQL?Insert results of a stored procedure into a temporary tableFunction vs. Stored Procedure in SQL ServerHow can I do an UPDATE statement with JOIN in SQL?Getting value from stored procedure in another stored procedureAccess Stored Procedure Parameters with Dynamic SQLTransact-SQL stored procedure with conditional “AND” logicMerge stored procedure with datatype conversionsSQL Stored Procedure if statement with bit






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I'm wondering if it's possible to execute a procedure inside the same procedure. I wouldn't like to use a trigger so what I'm trying to do is to execute the same procedure in a loop if condition is false after 10 minutes.



use CF_BPS
go

create procedure p_Monitoring_HLR_statusy
as

if (
(select sum(uruchom_api) as sprawdzenie from ANALIZY..CC_LISTA_SMS_API
where priorytet=0 and cast(aud_data as date)=cast(getdate() as
date))=0)

begin

insert into [CF_BPS].[dbo].[Monitoring_HLR_statusy]
([sp_id], [sp_numer], [tn_numer], [sms_api_check_date], [sms_api_phone], [sms_api_status])

select [sp_id], [sp_numer], [telefon], [sms_api_check_date], [sms_api_phone], [sms_api_status] from ANALIZY..CC_LISTA_SMS_API
where priorytet=0 and cast(aud_data as date)=cast(getdate() as date)

end

else

begin

waitfor delay '00:10:00.000'
execute p_Monitoring_HLR_statusy

end


go










share|improve this question






















  • why not a job scheduled every 10 minutes?

    – PSK
    Mar 26 at 10:52











  • But I don't want a job to start every 10 min all the time, I'd like to stop it if condition is true. CanI do it using a job?

    – Arkadiusz
    Mar 26 at 10:57






  • 1





    yes, if you don't want the job to run again you can use sp_stop_job

    – PSK
    Mar 26 at 10:59











  • That's what I want.

    – Arkadiusz
    Mar 26 at 11:12











  • sp_stop_job procedure stops executing running job but it doesn't alter the fact that the job will fire according to the schedule.

    – Arkadiusz
    Mar 26 at 11:46

















0















I'm wondering if it's possible to execute a procedure inside the same procedure. I wouldn't like to use a trigger so what I'm trying to do is to execute the same procedure in a loop if condition is false after 10 minutes.



use CF_BPS
go

create procedure p_Monitoring_HLR_statusy
as

if (
(select sum(uruchom_api) as sprawdzenie from ANALIZY..CC_LISTA_SMS_API
where priorytet=0 and cast(aud_data as date)=cast(getdate() as
date))=0)

begin

insert into [CF_BPS].[dbo].[Monitoring_HLR_statusy]
([sp_id], [sp_numer], [tn_numer], [sms_api_check_date], [sms_api_phone], [sms_api_status])

select [sp_id], [sp_numer], [telefon], [sms_api_check_date], [sms_api_phone], [sms_api_status] from ANALIZY..CC_LISTA_SMS_API
where priorytet=0 and cast(aud_data as date)=cast(getdate() as date)

end

else

begin

waitfor delay '00:10:00.000'
execute p_Monitoring_HLR_statusy

end


go










share|improve this question






















  • why not a job scheduled every 10 minutes?

    – PSK
    Mar 26 at 10:52











  • But I don't want a job to start every 10 min all the time, I'd like to stop it if condition is true. CanI do it using a job?

    – Arkadiusz
    Mar 26 at 10:57






  • 1





    yes, if you don't want the job to run again you can use sp_stop_job

    – PSK
    Mar 26 at 10:59











  • That's what I want.

    – Arkadiusz
    Mar 26 at 11:12











  • sp_stop_job procedure stops executing running job but it doesn't alter the fact that the job will fire according to the schedule.

    – Arkadiusz
    Mar 26 at 11:46













0












0








0








I'm wondering if it's possible to execute a procedure inside the same procedure. I wouldn't like to use a trigger so what I'm trying to do is to execute the same procedure in a loop if condition is false after 10 minutes.



use CF_BPS
go

create procedure p_Monitoring_HLR_statusy
as

if (
(select sum(uruchom_api) as sprawdzenie from ANALIZY..CC_LISTA_SMS_API
where priorytet=0 and cast(aud_data as date)=cast(getdate() as
date))=0)

begin

insert into [CF_BPS].[dbo].[Monitoring_HLR_statusy]
([sp_id], [sp_numer], [tn_numer], [sms_api_check_date], [sms_api_phone], [sms_api_status])

select [sp_id], [sp_numer], [telefon], [sms_api_check_date], [sms_api_phone], [sms_api_status] from ANALIZY..CC_LISTA_SMS_API
where priorytet=0 and cast(aud_data as date)=cast(getdate() as date)

end

else

begin

waitfor delay '00:10:00.000'
execute p_Monitoring_HLR_statusy

end


go










share|improve this question














I'm wondering if it's possible to execute a procedure inside the same procedure. I wouldn't like to use a trigger so what I'm trying to do is to execute the same procedure in a loop if condition is false after 10 minutes.



use CF_BPS
go

create procedure p_Monitoring_HLR_statusy
as

if (
(select sum(uruchom_api) as sprawdzenie from ANALIZY..CC_LISTA_SMS_API
where priorytet=0 and cast(aud_data as date)=cast(getdate() as
date))=0)

begin

insert into [CF_BPS].[dbo].[Monitoring_HLR_statusy]
([sp_id], [sp_numer], [tn_numer], [sms_api_check_date], [sms_api_phone], [sms_api_status])

select [sp_id], [sp_numer], [telefon], [sms_api_check_date], [sms_api_phone], [sms_api_status] from ANALIZY..CC_LISTA_SMS_API
where priorytet=0 and cast(aud_data as date)=cast(getdate() as date)

end

else

begin

waitfor delay '00:10:00.000'
execute p_Monitoring_HLR_statusy

end


go







tsql






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 26 at 10:47









ArkadiuszArkadiusz

808 bronze badges




808 bronze badges












  • why not a job scheduled every 10 minutes?

    – PSK
    Mar 26 at 10:52











  • But I don't want a job to start every 10 min all the time, I'd like to stop it if condition is true. CanI do it using a job?

    – Arkadiusz
    Mar 26 at 10:57






  • 1





    yes, if you don't want the job to run again you can use sp_stop_job

    – PSK
    Mar 26 at 10:59











  • That's what I want.

    – Arkadiusz
    Mar 26 at 11:12











  • sp_stop_job procedure stops executing running job but it doesn't alter the fact that the job will fire according to the schedule.

    – Arkadiusz
    Mar 26 at 11:46

















  • why not a job scheduled every 10 minutes?

    – PSK
    Mar 26 at 10:52











  • But I don't want a job to start every 10 min all the time, I'd like to stop it if condition is true. CanI do it using a job?

    – Arkadiusz
    Mar 26 at 10:57






  • 1





    yes, if you don't want the job to run again you can use sp_stop_job

    – PSK
    Mar 26 at 10:59











  • That's what I want.

    – Arkadiusz
    Mar 26 at 11:12











  • sp_stop_job procedure stops executing running job but it doesn't alter the fact that the job will fire according to the schedule.

    – Arkadiusz
    Mar 26 at 11:46
















why not a job scheduled every 10 minutes?

– PSK
Mar 26 at 10:52





why not a job scheduled every 10 minutes?

– PSK
Mar 26 at 10:52













But I don't want a job to start every 10 min all the time, I'd like to stop it if condition is true. CanI do it using a job?

– Arkadiusz
Mar 26 at 10:57





But I don't want a job to start every 10 min all the time, I'd like to stop it if condition is true. CanI do it using a job?

– Arkadiusz
Mar 26 at 10:57




1




1





yes, if you don't want the job to run again you can use sp_stop_job

– PSK
Mar 26 at 10:59





yes, if you don't want the job to run again you can use sp_stop_job

– PSK
Mar 26 at 10:59













That's what I want.

– Arkadiusz
Mar 26 at 11:12





That's what I want.

– Arkadiusz
Mar 26 at 11:12













sp_stop_job procedure stops executing running job but it doesn't alter the fact that the job will fire according to the schedule.

– Arkadiusz
Mar 26 at 11:46





sp_stop_job procedure stops executing running job but it doesn't alter the fact that the job will fire according to the schedule.

– Arkadiusz
Mar 26 at 11:46












1 Answer
1






active

oldest

votes


















1














In order to avoid the recursion issue, and to just make the logic more transparent, I'd break this into two pieces. In SQL Agent, this is dead simple. Probably not much harder in any other scheduling tool.



First, have the job execute your procedure. Instead of the WAITFOR, though, have the ELSE clause THROW an error. (Note the semi-colon after BEGIN; it's a requirement for THROW.)



Then set up your job scheduler to retry the failed job after a 10 minute delay, and set a limit for the number of retries so you don't accidentally put yourself in a situation where the job just keeps trying even if your data never shows up.



The revised proc looks like this:



use CF_BPS
go

create procedure p_Monitoring_HLR_statusy
as

if (
(select sum(uruchom_api) as sprawdzenie from ANALIZY..CC_LISTA_SMS_API
where priorytet=0 and cast(aud_data as date)=cast(getdate() as
date))=0)

begin;

insert into [CF_BPS].[dbo].[Monitoring_HLR_statusy]
([sp_id], [sp_numer], [tn_numer], [sms_api_check_date], [sms_api_phone], [sms_api_status])

select [sp_id], [sp_numer], [telefon], [sms_api_check_date], [sms_api_phone], [sms_api_status] from ANALIZY..CC_LISTA_SMS_API
where priorytet=0 and cast(aud_data as date)=cast(getdate() as date);

end

else

begin;

THROW 51000, 'The data does not exist yet.', 1;

end





share|improve this answer























  • I'm of opinion that it's a little bit confusing that "Retry Attempts" feature is below "On success action" section. How is this feature supposed to work?

    – Arkadiusz
    Mar 27 at 8:34






  • 1





    Yes, that tab isn't very intuitive. Once you've set it up a couple of times, though, it's easy to remember. Just select the number of minutes to wait between retries (in your case, you want a ten minute wait), and then select the number of times you want it to retry. It sounds like you want that to be a pretty large number. Here's a short blog post with a corresponding screen shot: sqldbpool.com/2014/06/01/…

    – Eric Brandt
    Mar 27 at 13:15










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55355265%2fcan-i-use-waitfor-delay-to-execute-a-procedure%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














In order to avoid the recursion issue, and to just make the logic more transparent, I'd break this into two pieces. In SQL Agent, this is dead simple. Probably not much harder in any other scheduling tool.



First, have the job execute your procedure. Instead of the WAITFOR, though, have the ELSE clause THROW an error. (Note the semi-colon after BEGIN; it's a requirement for THROW.)



Then set up your job scheduler to retry the failed job after a 10 minute delay, and set a limit for the number of retries so you don't accidentally put yourself in a situation where the job just keeps trying even if your data never shows up.



The revised proc looks like this:



use CF_BPS
go

create procedure p_Monitoring_HLR_statusy
as

if (
(select sum(uruchom_api) as sprawdzenie from ANALIZY..CC_LISTA_SMS_API
where priorytet=0 and cast(aud_data as date)=cast(getdate() as
date))=0)

begin;

insert into [CF_BPS].[dbo].[Monitoring_HLR_statusy]
([sp_id], [sp_numer], [tn_numer], [sms_api_check_date], [sms_api_phone], [sms_api_status])

select [sp_id], [sp_numer], [telefon], [sms_api_check_date], [sms_api_phone], [sms_api_status] from ANALIZY..CC_LISTA_SMS_API
where priorytet=0 and cast(aud_data as date)=cast(getdate() as date);

end

else

begin;

THROW 51000, 'The data does not exist yet.', 1;

end





share|improve this answer























  • I'm of opinion that it's a little bit confusing that "Retry Attempts" feature is below "On success action" section. How is this feature supposed to work?

    – Arkadiusz
    Mar 27 at 8:34






  • 1





    Yes, that tab isn't very intuitive. Once you've set it up a couple of times, though, it's easy to remember. Just select the number of minutes to wait between retries (in your case, you want a ten minute wait), and then select the number of times you want it to retry. It sounds like you want that to be a pretty large number. Here's a short blog post with a corresponding screen shot: sqldbpool.com/2014/06/01/…

    – Eric Brandt
    Mar 27 at 13:15















1














In order to avoid the recursion issue, and to just make the logic more transparent, I'd break this into two pieces. In SQL Agent, this is dead simple. Probably not much harder in any other scheduling tool.



First, have the job execute your procedure. Instead of the WAITFOR, though, have the ELSE clause THROW an error. (Note the semi-colon after BEGIN; it's a requirement for THROW.)



Then set up your job scheduler to retry the failed job after a 10 minute delay, and set a limit for the number of retries so you don't accidentally put yourself in a situation where the job just keeps trying even if your data never shows up.



The revised proc looks like this:



use CF_BPS
go

create procedure p_Monitoring_HLR_statusy
as

if (
(select sum(uruchom_api) as sprawdzenie from ANALIZY..CC_LISTA_SMS_API
where priorytet=0 and cast(aud_data as date)=cast(getdate() as
date))=0)

begin;

insert into [CF_BPS].[dbo].[Monitoring_HLR_statusy]
([sp_id], [sp_numer], [tn_numer], [sms_api_check_date], [sms_api_phone], [sms_api_status])

select [sp_id], [sp_numer], [telefon], [sms_api_check_date], [sms_api_phone], [sms_api_status] from ANALIZY..CC_LISTA_SMS_API
where priorytet=0 and cast(aud_data as date)=cast(getdate() as date);

end

else

begin;

THROW 51000, 'The data does not exist yet.', 1;

end





share|improve this answer























  • I'm of opinion that it's a little bit confusing that "Retry Attempts" feature is below "On success action" section. How is this feature supposed to work?

    – Arkadiusz
    Mar 27 at 8:34






  • 1





    Yes, that tab isn't very intuitive. Once you've set it up a couple of times, though, it's easy to remember. Just select the number of minutes to wait between retries (in your case, you want a ten minute wait), and then select the number of times you want it to retry. It sounds like you want that to be a pretty large number. Here's a short blog post with a corresponding screen shot: sqldbpool.com/2014/06/01/…

    – Eric Brandt
    Mar 27 at 13:15













1












1








1







In order to avoid the recursion issue, and to just make the logic more transparent, I'd break this into two pieces. In SQL Agent, this is dead simple. Probably not much harder in any other scheduling tool.



First, have the job execute your procedure. Instead of the WAITFOR, though, have the ELSE clause THROW an error. (Note the semi-colon after BEGIN; it's a requirement for THROW.)



Then set up your job scheduler to retry the failed job after a 10 minute delay, and set a limit for the number of retries so you don't accidentally put yourself in a situation where the job just keeps trying even if your data never shows up.



The revised proc looks like this:



use CF_BPS
go

create procedure p_Monitoring_HLR_statusy
as

if (
(select sum(uruchom_api) as sprawdzenie from ANALIZY..CC_LISTA_SMS_API
where priorytet=0 and cast(aud_data as date)=cast(getdate() as
date))=0)

begin;

insert into [CF_BPS].[dbo].[Monitoring_HLR_statusy]
([sp_id], [sp_numer], [tn_numer], [sms_api_check_date], [sms_api_phone], [sms_api_status])

select [sp_id], [sp_numer], [telefon], [sms_api_check_date], [sms_api_phone], [sms_api_status] from ANALIZY..CC_LISTA_SMS_API
where priorytet=0 and cast(aud_data as date)=cast(getdate() as date);

end

else

begin;

THROW 51000, 'The data does not exist yet.', 1;

end





share|improve this answer













In order to avoid the recursion issue, and to just make the logic more transparent, I'd break this into two pieces. In SQL Agent, this is dead simple. Probably not much harder in any other scheduling tool.



First, have the job execute your procedure. Instead of the WAITFOR, though, have the ELSE clause THROW an error. (Note the semi-colon after BEGIN; it's a requirement for THROW.)



Then set up your job scheduler to retry the failed job after a 10 minute delay, and set a limit for the number of retries so you don't accidentally put yourself in a situation where the job just keeps trying even if your data never shows up.



The revised proc looks like this:



use CF_BPS
go

create procedure p_Monitoring_HLR_statusy
as

if (
(select sum(uruchom_api) as sprawdzenie from ANALIZY..CC_LISTA_SMS_API
where priorytet=0 and cast(aud_data as date)=cast(getdate() as
date))=0)

begin;

insert into [CF_BPS].[dbo].[Monitoring_HLR_statusy]
([sp_id], [sp_numer], [tn_numer], [sms_api_check_date], [sms_api_phone], [sms_api_status])

select [sp_id], [sp_numer], [telefon], [sms_api_check_date], [sms_api_phone], [sms_api_status] from ANALIZY..CC_LISTA_SMS_API
where priorytet=0 and cast(aud_data as date)=cast(getdate() as date);

end

else

begin;

THROW 51000, 'The data does not exist yet.', 1;

end






share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 26 at 15:23









Eric BrandtEric Brandt

3,9631 gold badge12 silver badges28 bronze badges




3,9631 gold badge12 silver badges28 bronze badges












  • I'm of opinion that it's a little bit confusing that "Retry Attempts" feature is below "On success action" section. How is this feature supposed to work?

    – Arkadiusz
    Mar 27 at 8:34






  • 1





    Yes, that tab isn't very intuitive. Once you've set it up a couple of times, though, it's easy to remember. Just select the number of minutes to wait between retries (in your case, you want a ten minute wait), and then select the number of times you want it to retry. It sounds like you want that to be a pretty large number. Here's a short blog post with a corresponding screen shot: sqldbpool.com/2014/06/01/…

    – Eric Brandt
    Mar 27 at 13:15

















  • I'm of opinion that it's a little bit confusing that "Retry Attempts" feature is below "On success action" section. How is this feature supposed to work?

    – Arkadiusz
    Mar 27 at 8:34






  • 1





    Yes, that tab isn't very intuitive. Once you've set it up a couple of times, though, it's easy to remember. Just select the number of minutes to wait between retries (in your case, you want a ten minute wait), and then select the number of times you want it to retry. It sounds like you want that to be a pretty large number. Here's a short blog post with a corresponding screen shot: sqldbpool.com/2014/06/01/…

    – Eric Brandt
    Mar 27 at 13:15
















I'm of opinion that it's a little bit confusing that "Retry Attempts" feature is below "On success action" section. How is this feature supposed to work?

– Arkadiusz
Mar 27 at 8:34





I'm of opinion that it's a little bit confusing that "Retry Attempts" feature is below "On success action" section. How is this feature supposed to work?

– Arkadiusz
Mar 27 at 8:34




1




1





Yes, that tab isn't very intuitive. Once you've set it up a couple of times, though, it's easy to remember. Just select the number of minutes to wait between retries (in your case, you want a ten minute wait), and then select the number of times you want it to retry. It sounds like you want that to be a pretty large number. Here's a short blog post with a corresponding screen shot: sqldbpool.com/2014/06/01/…

– Eric Brandt
Mar 27 at 13:15





Yes, that tab isn't very intuitive. Once you've set it up a couple of times, though, it's easy to remember. Just select the number of minutes to wait between retries (in your case, you want a ten minute wait), and then select the number of times you want it to retry. It sounds like you want that to be a pretty large number. Here's a short blog post with a corresponding screen shot: sqldbpool.com/2014/06/01/…

– Eric Brandt
Mar 27 at 13:15








Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55355265%2fcan-i-use-waitfor-delay-to-execute-a-procedure%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript