Skip to main content
Todd in Italy
Inspiring
April 2, 2024
Question

Account for scheduled tasks in a Windows environment

  • April 2, 2024
  • 2 replies
  • 1924 views

Kind of a dumb question, but I can't find this in the documentation. I inherited an old ColdFusion server with several existing scheduled tasks. I rebuilt the server from scratch, and imported the scheduled tasks, which run on a user account "taskrunner." My question is where should I put this account? Does it need to be a local user account on the IIS server that hosts ColdFusion, or is there somewhere in ColdFusion where I need to create/define this account? I am a bit confused becuase the old server does not have a local account with the name "taskrunner" yet the tasks were running before the rebuild, and do not run now. Clearly the account must be created somewhere, but where?

    This topic has been closed for replies.

    2 replies

    Charlie Arehart
    Community Expert
    Community Expert
    April 3, 2024

    To your last comment, your screenshot offered there shows you referring instead now to the "user name" field in setting up a cf scheduled task. To be clear, that is info about providing authentication for running the url offered in the scheduled task, if such auth would be required by the web server serving that url.

     

    Again, though, that would have nothing to do with any cf admin username nor is it the "account under which the task runs" (in the sense I initially thought you were referring to). On the latter point, I suspect we're just differing in semantics. The first points in my reply here seem to resolve the confusion I had regarding your wording.

     

    And what matters most is if your problem is resolved. It sounds like you feel you won't know until a cf restart. Again, to me that should have no bearing on your changing the username field in a task, nor in running it. But let's see how things play out for you. 

    /Charlie (troubleshooter, carehart. org)
    Todd in Italy
    Inspiring
    April 3, 2024

    Thank you, Charlie, but now I am more confused. The question remains... for the account shown in the scheduled task set up page I posted, where do I recreate that account so that the job will run?

    Todd in Italy
    Inspiring
    April 3, 2024

    The only three possibilities I can think of are: 1) within the CF application. That is not the case because the account data is carried over with the SQL restoral, like all the accounts for the actual application, and it did not come over when I restored the database, so it is not an application account. 2) a local account on the IIS server. I checked the old server where it was working, and there is no such local account. 3) within ColdFusion. That seems likely, but the only place to put an account in CF is in the administrator account creation portion, which I have done, but it did not yet work (will find out after a restart). 
    Is there anywhere else it could be? Surely setting up an account for scheduled tasks is a fairly standard operation for ColdFusion, but the documentation just says to enter the account name and password. It does not tell me where this account is stored or how to recreate it (or it's too difficult for me to find).

    Todd in Italy
    Inspiring
    April 2, 2024

    I found the answer. The account is created within ColdFusion, after enabling multi user for the administration of CF. 

    Charlie Arehart
    Community Expert
    Community Expert
    April 2, 2024

    If that is indeed the correct answer, it may help you and readers to assess how you'd posed the question. To be clear, by your adding a new user in the admin, that controls only the ability to login to the admin with that different username (versus the default "admin").  And when one does that, it control what admin pages that admin user SEES.

     

    But to be clear it doesn't have anything to do with "what account the task runs under": that would be the account running cf itself (as set in the service running cf). 

     

    I don't know if those distinctions will be helpful to you or others, but they seemed to be clarifications that might be appropriate. 

    /Charlie (troubleshooter, carehart. org)
    Todd in Italy
    Inspiring
    April 3, 2024

    Charlie,

    I am referring to the user name entered when setting up scheduled tasks, as shown in the attached screen shot. This account name should be an account created somewhere.... either in the OS as a user, or in CF as a user. The question is where should I create the account to match this user name?

    Thanks,

    Todd