Coldfusion 8 scheduled task not running? - coldfusion

I started a job as a web developer at a company a few months ago managing a bunch of Coldfusion applications among other things. Apparently a scheduled task was set up many years ago, and worked fine until it stopped working under one of the previous web developers, a couple of years ago. No one knows why it stopped working, but it is now my job to fix it. This is my first job as a web developer, I didn't know CF when I started my job (barely knew it existed), and I only started learning about scheduled tasks this morning, so just know that I am a total newbie.
The file is a basic one- it just updates a table in the database. If you run the URL in the browser (which is what they have been doing for the past couple of years), it runs fine, and everything is updated. The scheduled task, which was set to run every night, has not been updating the file. I've tried turning on the log in CF Admin, setting it to run at various times this morning, and also just telling it to run manually, and according to the log, it is executing (with no errors), but the file is not being updated. I tried commenting out most of the file and just telling it to send a basic e-mail, with no variables or anything, but I am getting the same result.
Any ideas? I have no idea what to try from here. I tried looking for a solution online, but the only post I found similar to my situation is this, where people seem to be suggesting that the issue may be variables that are not available to the scheduler:
coldfusion scheduled task not sending emails
There are no variables on my page right now though. I tried running the task via CFSCHEDULE, per the suggestion on that page, but I got the same result as before. Some of the other suggestions (server monitor/FusionReactor/cflog) I just plain don't know how to do, so I have not tried those.
Edit: Right now, this is the only code in the page which is not commented out:
<cfmail
to="[e-mail address]"
from="[e-mail address]"
Subject="is it running at all?">
Is it running?
</cfmail>
Edit 2: Okay, now I've got something like this before and after the code for the e-mail:
<cflog
text = "before e-mail"
application = "yes"
log = "Scheduler"
type = "information">
I see the log messages if I actually go to the URL for the file (and the e-mail is sent as well), but not if I tell it to run the scheduled task from CF admin. Because the e-mail sends when I open the file in the browser, I don't think it is a problem with the mail server.
Edit 3: Yes, the e-mail addresses are plain, hard-coded strings.
I'm not exactly sure what you mean by "covered" by an Application.cfm file though. There is an Application.cfm file in the top-level of the site, but not within this particular sub-directory. There are a number of Application scope variables, but none that are used in the file as it is now.
Edit 4: Thank you for the explanation. As I said, total n00b when it comes to CF, so I appreciate the help. The Application.cfm page for this application checks to see if you are logged in, and if you are not, redirects you to the log in page. Could that be the issue?
Edit 5: YAY! It seems like that was the issue. Thank you thank you thank you! Leigh, please submit that as an answer so that I can choose it. You are my hero!

(From the comments )
A long shot but is your scheduled task inside a directory covered by an Application.cfm/Application.cfc file? The reason for asking is that the code inside the parent Application.cfm file executes first before your .cfm script. Is there any code inside the Application.cfm file that aborts a request or redirects (such as permissions check)?

Related

ColdFusion 2018 scheduled tasks not working

We have recently began migrating to ColdFusion 2018 Enterprise, but have found that the scheduled tasks do not work. Although the relevant cfm file works if run in the browser on the same server, if we try and run it as a scheduled tasks then it does not work (although it will say it has run successfully on the screen).
The log file just contains a single line for each run:
Information","DefaultQuartzScheduler_Worker-5","11/20/20","12:48:18","","Task default.takename triggered."
From what I understand there should be additional lines for the http request etc, however.
We have tried various usernames and passwords, including admin accounts to make sure it is not a permissions issue but nothing seems to make any difference.
We have also tried outputting to a file but nothing ever populates the file, although it does update the file's modified date with the date/time the tasks ran (or create a new file if necessary).
Does anyone have any experience with this type of problem?
This ended up being an IIS permissions issue. We resolved it by enabling anonymous authentication for both the directory that the relevant cfm files are contained in, as well as the "jakarta" directory that I believe ColdFusion uses for some integration requirements. Scheduled tasks then ran as expected.

Blocked at google's two-step verification

So the story goes that I had a perfectly working script for the past week or so, it would log in to google (by loading a certain firefox profile - which allowed me to skip 2 -step verification), scrape some data from the company site (which needs google login to access), save to csv and quit. This would occur hourly for analysis.
Alas, alack, the issue arose this morning where instead of logging in directly, the two-step verification is appearing, even though the script has not changed at all. I cannot program to enter username+password, because it sends a text to my phone with a verification code after this...
I'm absolutely at a loss. I thought loading the firefox profile would avoid this problem (and it did for ~ 5 days). Can you help me?
I am using Python 2.7, Selenium & Mac OSX

Malware/Adware on site deployed on AWS Elasticbeanstalk

I guess the title says it all.
I noticed some ads were popping up on a client's site we are currently developing. It only shows on this particular site. Not any other site. It is very annoying to put it mildly.
I thought removing it would be as easy as setting up a new environment on ElasticBeanstalk for it. I was wrong!
I have started a fresh instance for the application, scanned the project folder for malware before deploying, emptied the content of s3 bucket for static files. All these made no difference. The adware/malware is still there.
It has been driving me nuts for the past few days. Does anyone know how to resolve this kind of problem?
Mark B pointed me in the right direction.
I used inspect element to check the network processes of pages showing the Malware/Adware. It was after this i noticed a few asynchronous posts going to http://api.adsrun.net/post. Of course, i'm not making any post calls to this link. So i decided to inspect my JavaScript files as seen in View Page Source. Fortunately, it was in the last few lines of the second file i inspected. Immediately i deleted this file, normalcy returned to my web application.
It has been a very frustrating several hours. Thanks once again, Mark B for your suggestion.

Django CMS edit gives no data

Django CMS = 3.1.1, 3.1.2, 3.1.3
Django = 1.6.5, 1.6.11
The problem is:
a user with proper access rights, who previously successfully edited a page, returns to a page, and attempts to edit it.
he logs in
he selects the page - in no-edit view, it loads fine, it has a collection of content
he goes to edit view - there is absolutely no page content - static content is there, but all content relevant to that particular page is missing.
Reverting versions does no good - any version is blank.
A user who is not stuck in this state can view and edit the page just fine.
When the problem occurs, it is stuck there for many repetitions.
Things that don't fix the problem:
server restarts
dumping and reloading the database
logging out logging in
upgrading django cms across the 3.1.X space
removing reversion
flushing the mysql cache
We have the same basic installation in vagrant dev boxes, a test server emulating all settings of the live (but with older data), and the live server - all three installations have seen this problem across 3 different variants of our other code bases.
Our data dumps from a MUCH smaller database taken from 9/13 do not have this problem
We haven't been able to find a trigger or a root cause.
The problem IS coming in intermittently, but over longish time spans. For example:
2 weeks ago, all privileged users could edit the page
4 days ago - several users experienced the problem. It was repeatable on more than 1/2 the pages of the site, but 2 pages worked fine for those users. Problem was repeatable for hours.
today - in the morning the problem persisted in the 4 day ago state.
6 hours later - the problem is gone on the live site, but persists elsewhere.
5 days later - it's back and it's affecting ALL users, including those who had not previously been affected.
I feel like I'm chasing a phantom here. Any help would be appreciated. I'm glad to give data dumps or anything else requested to see what can be done or if there's a best way to turn on debug logging to trace this.

setting up Undelivr and Spool folder for CFmail

I am working on an application, and I am trying to get emails undercontrol. All the projects I have worked on since starting ColdFusion hav had the email set up with the Undelivr folder and everything; However, this one does not.
I am unsure how to go about setting up the Undelivr and Spool folders for the cfmail of an application. If someone could point me in the direction of a tutorial on how to set this up or something I would appreciate it.
I have been looking for a solution for this for a couple of hours now and will of course continue to look. The only thing I am getting at the moment however is people having problems and not understanding the spooling, but I understand that part but have never had to set it all up before.
Thanks in advance
There should be nothing to "set up". Have you defined your mail server? Have you set it to spool mail messages to disk?
ColdFusion will create those folders for you. They should be under {ColdFusion}/Mail/Spool and {ColdFusion}/Mail/Undelivr.