Quantcast
Channel: Adobe Community : Unanswered Discussions - ColdFusion
Viewing all articles
Browse latest Browse all 5794

Programmatically-created scheduled task fired off 3x in the same millisecond before erroring out

$
0
0

The task is created when a page is manually loaded via a ColdFusion page. We've used the same process for about a year now without incident (and I can't repeat the error now...). The code also checks a database field to make sure the email hasn't already been sent - it got through that as well somehow.

 

Here are the logs (I assume the ordering here is off since it all happened at the exact same time). It looks like it fired off 3x before it got the "Unable to store Job" error:

 

Jul 23, 2015 12:03:58 PM Information [DefaultQuartzScheduler_Worker-1] - Task DEFAULT.Blaster triggered.

Jul 23, 2015 12:03:58 PM Error [ajp-bio-8012-exec-1] - Unable to store Job : 'SERVERSCHEDULETASK#$%^DEFAULT.BLASTER', because one already exists with this identification.

Jul 23, 2015 12:03:58 PM Information [DefaultQuartzScheduler_Worker-1] - Starting HTTP request {URL='http://localhost:80/emailcampaigns/email.cfm?sendemails=true&RequestTimeout=90', method='get'}

Jul 23, 2015 12:03:58 PM Error [ajp-bio-8012-exec-1] - Unable to store Job : 'SERVERSCHEDULETASK#$%^DEFAULT.BLASTER', because one already exists with this identification. The specific sequence of files included or processed is: C:\cf10\wwwroot\emailCampaigns\email.cfm, line: 10

Jul 23, 2015 12:03:58 PM Information [DefaultQuartzScheduler_Worker-4] - Task DEFAULT.Blaster triggered.

Jul 23, 2015 12:03:58 PM Information [DefaultQuartzScheduler_Worker-3] - Task DEFAULT.Blaster triggered.

Jul 23, 2015 12:03:58 PM Information [DefaultQuartzScheduler_Worker-4] - Starting HTTP request {URL='http://localhost:80/emailcampaigns/email.cfm?sendemails=true&RequestTimeout=90', method='get'}

Jul 23, 2015 12:03:58 PM Information [DefaultQuartzScheduler_Worker-3] - Starting HTTP request {URL='http://localhost:80/emailcampaigns/email.cfm?sendemails=true&RequestTimeout=90', method='get'}

Jul 23, 2015 12:03:58 PM Information [DefaultQuartzScheduler_Worker-5] - Task DEFAULT.Blaster triggered.

Jul 23, 2015 12:03:58 PM Information [DefaultQuartzScheduler_Worker-5] - Starting HTTP request {URL='http://localhost:80/emailcampaigns/email.cfm?sendemails=true&RequestTimeout=90', method='get'}

Jul 23, 2015 12:03:58 PM Information [DefaultQuartzScheduler_Worker-3] - HTTP request completed  {Status Code=200 ,Time taken=110 ms}

Jul 23, 2015 12:03:58 PM Information [DefaultQuartzScheduler_Worker-4] - HTTP request completed  {Status Code=200 ,Time taken=110 ms}

Jul 23, 2015 12:03:58 PM Information [DefaultQuartzScheduler_Worker-1] - HTTP request completed  {Status Code=200 ,Time taken=296 ms}

Jul 23, 2015 12:03:58 PM Information [DefaultQuartzScheduler_Worker-5] - HTTP request completed  {Status Code=200 ,Time taken=78 ms}

 

And here is the triggering code:

 

 

I only loaded the triggering page once, and even if I did load it multiple times, it shouldn't be able to create a task by the same name. And even then, I'm not sure how it defeated the database field check (I assume it happened so fast that the field wasn't written to yet?). The only thing I can think to do is lock the database table for reads and writes, which I guess I should be doing anyway. I have no confidence in this process now.


We're using

- CF 10 Standard

- MySQL 5.6.23

- Windows Server 2008R2

 

Any ideas?

 

Thanks,

Dave


Viewing all articles
Browse latest Browse all 5794

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>