scheduled-tasks

Handling exception logging in a Java task scheduler program?

别说谁变了你拦得住时间么 提交于 2019-12-12 02:14:25
问题 I need to design a Task Scheduler Where 1) User should be able to schedule multiple task at the same time. 2) There should be proper error handling on failure of any task and should not affect the other running tasks. I found the related programme at http://www.roseindia.net/java/example/java/util/CertainAndRepeatTime.shtml My concern is about handling of point 2 in program provided at above link. Say I schedule a recurring mail send process in above program which will be run first time on 12

funf delete archive files after upload

久未见 提交于 2019-12-12 01:55:59
问题 I was able to get v0.4.2 funf version working to schedule and upload files. After the files are upload data is backed up into "backup" folder. Does funf offer any options to limit the number of files to be backup/ delete old files etc? Thanks 回答1: The behaviour of the DefaultArchive (which I assume you are using) is explained here as follows: The backup folder is occasionally cleaned up to delete older files. Backup files are kept as long as they are not infringing on the free space of the

Scheduling a java.util.concurrent.Callable through Spring means

╄→尐↘猪︶ㄣ 提交于 2019-12-11 23:38:31
问题 The Spring org.springframework.scheduling.TaskScheduler is different from the JDK java.util.concurrent.ScheduledExecutorService in the way that it does not allow scheduling a java.util.concurrent.Callable with a fixed delay (it can just schedule java.lang.Runnable s). Is there a Spring-based alternative to the ScheduledExecutorService available (that is automatically shut down on context destruction) that supports scheduling Callable s? 回答1: If the only thing you need is shutdown, use destroy

Console app scheduled task run two different ways

*爱你&永不变心* 提交于 2019-12-11 23:28:39
问题 I have a program for a client that needs to run one set of code every 30 minutes via a scheduled task. at 1:30 am it needs to run a separate set of code. Both sets of code will generate a file and place it in a directory. How do I set it up to be able to run two sets of SQL code? I could do it getting the current date time and comparing it but that seems bulky to me. Is there a way a schedule task can run a program which would pass in something to my Main(string[] args)? Is there a correct

scheduledExecutorService, timerService and Stateless EJB on scheduled jobs

核能气质少年 提交于 2019-12-11 22:09:28
问题 I'm trying to implement a system in server that will do some updates on database on a ragular basis. Here: Spawning threads in a JSF managed bean for scheduled tasks using a timer and in some other similar questions, I saw that BalusC strongly recommended to use Stateless Beans, if not possible SchedulerExecuterService rather than Timer. Here is my situation. I need a JSF page in which I can configure the schedule interval. i.e. I can change its rule from run once in every 5 min to run once

How can I pass a powershell variable into a CMD command?

老子叫甜甜 提交于 2019-12-11 20:19:00
问题 I am trying to run the following command through powershell: schtasks /query /s $compname /v /fo csv | ConvertFrom-Csv $compname is set in the first part of the powershell script, but cannot be passed into the command like this. For example, when I try passing in $localhost, I get the following error: ERROR: Invalid syntax. Value expected for '/s'. Type "SCHTASKS /QUERY /?" for usage. Is there a way to pass the variable into this command? I don't plan to change to powershell's native way to

scheduling task from the command line + windows7 + spaces + arguments

霸气de小男生 提交于 2019-12-11 17:40:51
问题 I am trying to become familliar with add task to task scheduler via the command prompt. I seem to be having difficuly with spaces. This command works successfully in creating a task: schtasks /create /tn \Daily\SOTask /tr "C:\Users\User Name\FolerWhereScriptIs\vbsScript.vbs" /sc daily /mo 1 /st 08:50 SUCCESS: The scheduled task "\Daily\SOTask" has successfully been created. However, when I open the properties of this task in task scheduler i see in: Program/script: C:\Users\User Add arguments

wp_schedule_event not working

坚强是说给别人听的谎言 提交于 2019-12-11 16:29:10
问题 I am making a program that checks and send email in an hour using wp_schedule_event but it won't work on my end.. does any one have an idea about my case? this is my code I put it on my custom plugin myplugin-function.php register_activation_hook(__FILE__, 'my_activation'); add_action('my_hourly_event', 'do_this_hourly'); function my_activation() { wp_schedule_event(time(), 'hourly', 'my_hourly_event'); } function do_this_hourly() { $headers = "From: webmaster <webmaster@test.com>\r\n";

VBS Doesn't stop running

蓝咒 提交于 2019-12-11 16:28:02
问题 I have a scheduled task that launches a vb script which in turn runs a macro within excel. Everything runs fine (as in I get the results I want), however, the scheduled task remains 'running' and therefore doesn't start again the next morning. The VB Script is as follows: Option Explicit Dim xlApp, xlBook Set xlApp = CreateObject("Excel.Application") Set xlBook = xlApp.Workbooks.Open("C:\MyPath\My File.xlsm", 0, True) xlApp.Run "myMacro" xlBook.Close xlApp.Quit Set xlBook = Nothing Set xlApp

Spring ScheduledTasks not firing

谁说胖子不能爱 提交于 2019-12-11 16:23:17
问题 I'm trying to run a method in Spring with ScheduledTasks, so I have the following class: import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; import java.time.format.DateTimeFormatter; @Component public class ScheduledTasks { private static final Logger logger = LoggerFactory.getLogger(ScheduledTasks.class); private static final DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("HH:mm:ss"); public void