Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...DNN Module / Scheduled Job DoWork runs at App startupDNN Module / Scheduled Job DoWork runs at App startup
Previous
 
Next
New Post
9/22/2015 9:16 PM
 

Greetings!

We have a DNN module that is being used as a scheduled job. For some reason, when the site is starting up (or after installing the module), the DoWork() method is being hit. Is this standard behavior?

The job needs to run on Sunday @12pm. However it just ran when I installed it and went to a page on the website.

I need this DoWork() only to run at the scheduled time. Is this being loaded when the website is spinning up, and DNN is loading modules into itself? Is there any way to preclude this from happening?

Thanks!

 
New Post
9/23/2015 2:33 AM
 
the scheduler is not able to run on specific times, you may run it every hour and check whether it is near the desired time, however, this may fail as the scheduler will only be executed, if the application is running.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
9/23/2015 9:30 AM
 

Leopold,

That's not what the issue is so much. I don't care what time specifically it runs. Let's say that I want the job to run weekly, every monday. I set up like follows:

Friendly Name: Message Engine
Schedule Start Date/Time: 9/21/2015 12:00PM
Frequency: 1 Weeks
Retry Lapse Time: 1 Weeks

The job goes out on Monday, and going from Monday to Tuesday overnight, the application stops due to lack of website visitors. At 6AM on Tuesday morning, someone visits the site, which spins up IIS and DNN. When DNN loads, it seems to be loading the Message Engine module and invoking the DoWork() method.

What I did for now is set our message engine module to send me a text message when the job runs. I've also set Schedule Enabled to false, so the job shouldn't be run. In the past 12 hours I've received 8 text messages that the scheduled job has been run, even though disabled. The module is being executed over and over again, despite the scheduled job being disabled.

 

 
New Post
9/23/2015 10:07 AM
 
did you disable the scheduler or just your job?
did you restart DNN to make sure, the previous thread has been terminated?

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
9/23/2015 10:19 AM
 

I disabled the job, not the scheduler. However, I found a couple of things out:

1.) There were other scheduled jobs that were poorly named that were invoking this MessageEngineModule. I removed those.

2.) The code was not invoking the Completed() method. I changed it to invoke this method.

Unfortunately, now I'm experiencing the job running, showing as [X] Completed in the log, but with this:

S: 9/23/2015 10:15:21 AM
E: 9/23/2015 10:15:22 AM
N: 1/1/1753 12:00:00 AM

Now the job is running every minute with the 1/1/1753 date. Curious! :)

And Leopold, thanks for your dedication to the DNN forums. Apologies for my non-expertise in the platform, I keep inheriting these sites, but haven't really done one from the ground up. Always playing the bug fix game. 

Thanks!

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...DNN Module / Scheduled Job DoWork runs at App startupDNN Module / Scheduled Job DoWork runs at App startup


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out