SCHTASKS won't execute at scheduled time automatically - windows-server-2012

I have a schtask task called asset which won't execute automatically at the scheduled time 5:00am. I would however point out it ran automatically at it's scheduled time perfectly until recently. The asset task simply runs a php script.
schtasks /create /tn "ASSET" /tr "C:\xampp\php\php.exe c:\xampp\htdocs\asset\assetemailscheduler.php" /sc daily /st 05:00:00
When I explicitly run asset the task it works perfectly.
schtask /run /tn asset
Please advise.

Launch the Control Panel, Click Administrative Tools. Click the Task Scheduler. Now we must assign a user to the asset task at hand and a password. This resolved the shut down issues for me. The user I assigned to the asset task was my self. I assigned my own account to the asset task and provided my password. It's worth noting when you change your password. You must also update the password in the Task Scheduler for the asset task.

Related

Restart mysql service by Plesk Schedule Task

I need to execude a schedule task by Plesk.
I've create a schedule job to restart mysql service.
The result of this task is this:
Interactive authentication required is the output error.
You can do it only with system users like root or mysql. Unfortunately it's not possible to choose it from subscription's scheduled tasks menu. You can choose what system user to use for executing cron task only when creating task via:
Home > Tools & Settings > Scheduled Tasks
Screenshot of this menu

cron expression to run a webjob at 8 am everyday in azure

I actually require an cron expression to automatically restart an app at 8 am every day. for that I have to create an scheduled webjob in azure but i'm not getting the exact cron expression.
According to your description, if you want to created a scheduled WebJob which will fired at 8:00 AM.
I suggest you could try to use below cron.
At 8:00 AM every day: 0 0 8 * * *
More details about how to set the cron, you could refer to this article.
Result:
Besides, if you want to make sure your web jobs will continue worked. I suggest you should enable the "Always On" setting to be enabled on the app.
About how to enable it, you could refer to below steps:
Notice: This technique is available to Web Apps running in Basic, Standard or Premium mode

Inno Setup install on a schedule or at a specific time

I am aware that I could use Task Scheduler to schedule an unattended installation. However, is it possible to run the Setup, select options and then have it start the install process at a set time or with a countdown timer? If possible, how could this functionality be created?
You basically need two installers.
An actual installer.
A wrapper installer that will just store/install the actual installer somewhere and schedule a task to run the actual installer at a certain time.
It can actually be just one installer (binary), running with a different set of (command-line) arguments. But that's a bit more difficult to implement.
See also How to add a scheduled task with Inno Setup
Or consider using RunOnce registry key to schedule the upgrade for the next login (if that helps).

Change webjob from on demand to schedule

We have an azure webjob that was deployed as on demand. Is there a way to change this to run on a schedule without redeploying?
Not a lot of info out there on this.
I tried creating a new schedule collection like this and adding a job to run the existing webjob, but that didn't seem to work either.
I prefer to do this in the GUI portal, but if its not possible, I'll do it in powershell (if it is possible like that).
(Also, if it can only be changed by redeploying, I need to know that and it effectively answers the question)
To easily add a schedule to your triggered (on demand) webjob add a file called settings.job at the root of your webjob with this content:
{"schedule": "the schedule as a cron expression"}
Find out more about this here
Note: it'll only work properly for Standard or Premium sites and requires you to set the site as always on.
In the end the link in the original post I referenced worked. The thing that was missing for me was the understanding that creating a trigger job in scheduler will not affect the run status (on-demand or scheduled) of the web job itself. In my case it stayed "on-demand", but the schedule was in fact running it.
This should point you in the direction on how to do this via PowerShell. It looks possible to add already existing WebJobs to a scheduler.
Create a Scheduled Azure WebJob with PowerShell

Executing an MS Access macro from a scheduled task when the file is security file protected?

We have a series of Scheduled Tasks that run batch files that run MS Access macros on a Windows Server 2003 machine at work.
The batch files run with a command like so:
%PATH_TO_MS_ACCESS% C:\UCPData\SomeTaskDb.mdb /wrkgrp "C:\UCPData\Security.mdw" /x Macro1
The Task Scheduler Status reads The scheduled task did not run because an incorrect password or user name was entered.
When I right click the task in Scheduled Tasks and Run the task nothing happens.
But when I run the batch file from the run dialog it runs just fine. So it isn't a password issue.
The task is run as administrator. Is there some other reason the task won't run?
Figured it out. The issue was that the administrator password changed on the network but not in each of the individual Scheduled Tasks.

Resources