scheduled-tasks

Schedule Rails Task to run at a certain time

不想你离开。 提交于 2019-12-22 04:43:07
问题 I'm currently creating a rails application and would like to find out how to schedule certain tasks to run at a specific time. For e.g. An admin would want to send emails to his users at 8:00am in the morning and does not want to wake up early just to send that email. Therefore, he/she would want to schedule the task to send emails at that time. So, is there a way, or better still a gem, that allows tasks to be scheduled to run at a specific time? Thanks! 回答1: My preferred solution here is

Schedule Rails Task to run at a certain time

喜夏-厌秋 提交于 2019-12-22 04:43:00
问题 I'm currently creating a rails application and would like to find out how to schedule certain tasks to run at a specific time. For e.g. An admin would want to send emails to his users at 8:00am in the morning and does not want to wake up early just to send that email. Therefore, he/she would want to schedule the task to send emails at that time. So, is there a way, or better still a gem, that allows tasks to be scheduled to run at a specific time? Thanks! 回答1: My preferred solution here is

Microsoft.Win32.TaskScheduler NOT FOUND - I want to import this namespace in VB.NET

限于喜欢 提交于 2019-12-22 03:54:12
问题 I've been looking at sample code for interfacing with the Windows Task Scheduler, and most of them import the namespace: Microsoft.Win32.TaskScheduler When I go to import it, it's not there within Win32 . Does anyone know why I can't import it? I'm assuming that something isn't registered correctly on my machine, but I can't figure out how to fix it. Just for the record, I can start the Scheduled Task component under Accessories. I'm using VS 2008 (VB.Net) with Windows XP Professional. 回答1:

Developing a scheduled task for Windows

一个人想着一个人 提交于 2019-12-22 03:44:25
问题 I have to develop an application using C#.net that has to be run once a day. It only runs for at most one minute, so developing a Windows service is overkill and a scheduled task is the appropriate way. However, I have a few questions about how the application can communicate its results: How do I indicate to the task scheduler that the task has failed? Is this via the program's exit code? How do I log output information? Is console output automatically captured or do I have to write to the

Task Scheduler - Windows 7

安稳与你 提交于 2019-12-22 03:23:04
问题 I have 5 files that I would like to schedule to run monthly in windows 7 task scheduler. Problem is I want them to run in succession of one another. Example: File1 (this runs first) File2 (this runs after file 1 is done running) File3 (this runs after file 2 is done running) and so on... How do I go about this? Thanks! 回答1: From Windows Help (applies to Vista or later): A task action is the work that is performed when the task is run. A task can have a single action or a maximum of 32 actions

Java: Scheduled Tasks

柔情痞子 提交于 2019-12-22 00:53:57
问题 I have 2 tasks - Task A and Task B. Task A should execute first and on completion, I want to start my periodic Task B which keeps doing a task until it becomes success. How can I implement this in java? I was looking at scheduled execution services but those seem to be more time based rather than state of a task. 回答1: Here's one way: import java.util.concurrent.*; public class ScheduledTasks { public static void main(String[] args) { ScheduledExecutorService executorService = Executors

Django scheduled jobs

陌路散爱 提交于 2019-12-21 23:12:52
问题 I'm writing some auction functionality for a website powered by Django, and there is an option to have the auction be extended by a few seconds every time somebody bids (so that there is no last-minute sniping). When the auction is finished, certain things need to be done like notifying the winner of their victory and notifying the seller to whom they need to send the item. How, in Django, do I go about running an auction-completion script whenever an auction ends, especially when the auction

Distinction between ScheduledExecutorService and rolling your own Runnable with Thread.sleep()

匆匆过客 提交于 2019-12-21 20:45:47
问题 What are the benefits of using ScheduledExecutorService's scheduleAtFixedRate() to run a piece of code on a regular basis instead of creating a new Runnable that has a forever loop coupled with a Thread.sleep() that causes the thread to sleep for the desired period? Is there a performance gain with one of the methods? 回答1: The biggest benefit of using ScheduledExecutorService is that you don't need to write the code, and that it is well tested. It does also have support for cancelling tasks

Pause ScheduledExecutorService

▼魔方 西西 提交于 2019-12-21 09:14:24
问题 I am using a ScheduledExecutorService to execute a task that calls a service at a fixed rate. The service may return some data to the task. The task stores data in a queue. Some other threads slowly pick items from the queue import java.util.concurrent.BlockingQueue; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; public class EverlastingThread implements Runnable { private ScheduledExecutorService

Modify scheduling on Azure WebJob

Deadly 提交于 2019-12-21 07:23:10
问题 Like many others I am enthusiastic about the lightweight WebJobs that can so easily be added to Azure Websites. But I assumed one of the advantages with WebJobs was to easily modify the scheduling. When I tried I was surprised that there seems to be no way to do that. A deployed WebJob seems to be stuck with the initial scheduling. Do I need to deploy new WebJobs just to modify the scheduling? 回答1: To change the schedule, or to Modify the CRON value just use the App Service Editor to modify