scheduled-tasks

How to know the execution time in linux

自作多情 提交于 2020-01-15 06:19:26
问题 Suppose that I have three script(a.sh b.sh c.sh) to be launched in a script called launcher.sh: first=`date +%s` ./a.sh & ./b.sh & ./c.sh & final=`date +%s` executionTime=`echo "scale=3;($final - $first)/3600" | bc` echo $executionTime I know above script won't work because launcher.sh will finish immediately after launching a.sh, b.sh and c.sh. Launching a.sh, b.sh and c.sh without "&" is wasting time because they don't have to wait for each other. Suppose that the execution time for them

How to know the execution time in linux

☆樱花仙子☆ 提交于 2020-01-15 06:19:09
问题 Suppose that I have three script(a.sh b.sh c.sh) to be launched in a script called launcher.sh: first=`date +%s` ./a.sh & ./b.sh & ./c.sh & final=`date +%s` executionTime=`echo "scale=3;($final - $first)/3600" | bc` echo $executionTime I know above script won't work because launcher.sh will finish immediately after launching a.sh, b.sh and c.sh. Launching a.sh, b.sh and c.sh without "&" is wasting time because they don't have to wait for each other. Suppose that the execution time for them

Powershell Scheduled Tasks conflicts?

两盒软妹~` 提交于 2020-01-15 05:43:45
问题 I have scheduled two powershell scripts as tasks to run at 00:00. This morning I checked the event log and found that one of the scripts failed with the following exception: Failure. The error was: 'Failed to create log entry in: ‘C:\Users\SPSETU~1\AppData\Local\Temp\PowerShellLog.txt’. The error was: ‘The process cannot access the file 'C:\Users\SPsetupAdmin\AppData\Local\Temp\PowerShellLog.txt' because it is being used by another process.’.'. Can be the problem related to logs? Both the

windows service vs scheduled tasks

眉间皱痕 提交于 2020-01-15 03:23:26
问题 So this is my first stint with programmatically creating windows service or scheduled tasks and I am confused which one to choose. I had a look at various articles like http://weblogs.asp.net/jgalloway/archive/2005/10/24/428303.aspx , scheduled task or windows service and some more but can' t really decide btween the two Here is my scenario : My application will pick up the code paths of a few dlls from the db , execute the DLLs using MSTest.exe and log back the results to the Db. this will

Running .vbs through task Scheduler

你离开我真会死。 提交于 2020-01-14 03:27:06
问题 I am trying to run a vbs script through Task Scheduler. The code for the vbs script is Dim ObjExcel, ObjWB Set ObjExcel = CreateObject("excel.application") 'vbs opens a file specified by the path below Set ObjWB = ObjExcel.Workbooks.Open("FilePath\CombinePDFs.xlsm") 'either use the Workbook Open event (if macros are enabled), or Application.Run ObjWB.Close False ObjExcel.Quit Set ObjExcel = Nothing Then the Action in Task Scheduler is: Program/Script: "FilePath\CombinePDFS.vbs" With no added

Schedule and execute a PHP script automatically

冷暖自知 提交于 2020-01-13 09:49:51
问题 I have written a PHP script which generates an SQL file containing all tables in my database. What I want to do is execute this script daily or every n days. I have read about cron jobs but I am using Windows. How can I automate the script execution on the server? 回答1: You'll need to add a scheduled task to call the URL. First of all, read up here: MS KB - this is for Windows XP. Second, you'll need some way to call the URL - i'd recommend using something like wget - this way you can call the

Get last run date of task in Windows Scheduled Tasks from ASP.NET

不问归期 提交于 2020-01-13 05:11:06
问题 Is it possible to get the last run date of a scheduled task in Windows Scheduled Tasks from ASP.NET? Ideally, it would be good to be able to list, start and stop these tasks as well, though at this stage, the main thing I'd like to do is retrieve the last run time for a specific scheduled task. If this is not possible, my workaround is to simply have the application being run update the database or XML file with it's last run date, but as this information is already stored in Scheduled Tasks,

JVM returns error 143

浪尽此生 提交于 2020-01-11 08:51:10
问题 A Java application running as an scheduled task on Windows 2003 crashed with no logs or anything that would help to find out what happened. The only information available, is that the application returned code 143 (8F). That error code was retrieved from the scheduled tasks log. Does anyone knows what that error code (143) stands for? Is it possible that an user logging off could cause the application to be terminated? Thanks, 回答1: JVM error code 143 means Internal field must be valid. This

How to schedule a task in asyncio so it runs at a certain date?

萝らか妹 提交于 2020-01-11 03:07:08
问题 My program is supposed to run 24/7 and i want to be able to run some tasks at a certain hour/date. I have already tried to work with aiocron but it only supports scheduling functions (not coroutines) and i have read that is not a really good library. My program is built so most if not all the tasks that i would want to schedule are built in coroutines. Is there any other library that allows for such kind of task scheduling? Or if not, any way of warping coroutines so they run of a normal

Send emails in background job/scheduled task in asp.net mvc 3

雨燕双飞 提交于 2020-01-09 09:07:31
问题 I have an ASP.NET MVC 3 web app hosted on normal hosting , (i.e., no owned or virtual server), and I would like to be able to store e-mails say in a database and have them picked up and sent in a background job of sorts. If this was my own server I'd write a Windows Service to handle this, but is there any way I could implement/simulate a scheduled task/background job in a web application process? 回答1: You may take a look at Quartz.NET. There is a blog post about how you could make it running