Restart mysql service by Plesk Schedule Task - linux

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

Related

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

Using Jenkins to deploy to a Linux server and then run selenium test from a windows server

I am currently trying to deploy a website in PHP to a Linux server using jenkins and then use the same job to run a set of selenium test cases using python on a windows server, I can do both of these things individually but can not find a way to do them both within the same job.
I have tried using the Execute shell setting and then Executing a windows shell but do not know how to tell the job that these are different servers or if this is the correct method.
Is there a reason why you want to do both in the same job?
If you want job B to run only after Job A was completed successfully, You could have job A trigger Job B by using 'Add post-build action' in Job A configuration.

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