timer-jobs

Run a line of PHP code from user defined start time to end time without using CRON jobs

夙愿已清 提交于 2019-12-13 02:26:37
问题 I have a line of code that needs to be executed from an user-defined start time to an user defined end time. The problem is that a normal loop from start to end doesn't work because PHP gives me an error of "Execution Time Limit Exceeded". How do I get this done without using CRON jobs? (I need to run my server on a Windows PC) 回答1: Windows or not it's not excuse. Any platform features tools to let you do scheduled tasks. So does Windows. Here is tutorial about setting up Scheduled Tasks on

Debugging a custom timer job in SharePoint

江枫思渺然 提交于 2019-12-12 16:40:29
问题 To debug a custom timer job in visual studio, I wasn't able to hit the debugger. Is it necessary to add the .PDB file to GAC? I tried doing the above, but it's not allowing to drag and drop this particular file. Why do we need to add this file? 回答1: Drag and drop does not work in the assembly folder because of the shell windows explorer attaches to it. You can do 3 things to bypass this shell - Copy the .pdb file via cmd in C:\windows\assemblyGAC_MSIL\yourassembly\yourassemblyversion\ Use

Random Quotes Script on a timer?

只愿长相守 提交于 2019-12-12 03:09:19
问题 Hi I have this basic random quote script, but I would like it to output pages in an array, i.e. instead of "echo $quote", do some sort of array with "include('text.php, text2.php, text3.php');" etc. not quite sure how to do it. Any ideas? I would also like the timer to become the prominent selection feature so it chooses from a list that cycles, rather than is pulled at random. Thank you :) <?php $cachefile = './current_t_id'; $time = $id = null; $change_every = 3600; include('text.php'); if

Job-Scheduling in Play! Framework

筅森魡賤 提交于 2019-12-11 08:23:57
问题 I am currently into the development of a play-powered (v. 1.2.4) application where users can perform certain tasks and gain rewards for doing so. These tasks require some energy, which will be refilled over time. The basic setting is as follows: public class User extends Model { public Long energy; public Long maxenergy; public Long cooldown = Long.valueOf(300); } public class Task extends Controller { public static void perform(Long id) { User user = User.findById(id).first(); // do some

Debugging Sharepoint timer jobs

独自空忆成欢 提交于 2019-12-09 05:40:52
问题 I am creating my first Timer Job and want to debug it. I have installed the timer job through a feature, and added it to a webapplication's JobDefinitions collection, and added a SPMinuteSchedule to run every 5 minutes (for testing purposes). Then, in Visual Studio I've tried attaching the debugger to the WebApplication's Process, the Central Admin process and the OWSTIMER.exe process, but it will not debug into the Execute Method of the TimerJob. What am I missing here. P.S. The timer job

Scope of a timer job feature

我怕爱的太早我们不能终老 提交于 2019-12-05 20:49:50
问题 I am writing a timer job for the first time. I am following the examples that can be obtained by googling as my reference. In many such articles, I am coming across the timer job features being activated to the Site Collection level or the Site level. I feel this is weird, since there can be only one instance of a timer job for a particular web application. Should't all the timer job features be scoped to a Web application? Am I missing anything here? 回答1: It depends entirely on your scenario

Manually start SharePoint timer job

心不动则不痛 提交于 2019-12-05 09:13:59
I'd like to invoke a timer job installed on a SharePoint server manually. What would be useful is something along the lines of an stsadm command. My scenario is, I've deployed a solution with a bunch of features to a customers server. I don't want to wait for the weekly schedule to kick a particular timer job to life. I would like to just punch in a command to get the specific job to run immediately. Obviously in the development enviroment I've got the schedule set for a few minutes but I want to do a test run while I'm on site with the customer. You can develop a custom command line based

How do you instruct a SharePoint Farm to run a Timer Job on a specific server?

删除回忆录丶 提交于 2019-12-05 08:11:54
We have an SP timer job that was running fine for quite a while. Recently the admins enlisted another server into the farm, and consequently SharePoint decided to start running this timer job on this other server. The problem is the server does not have all the dependencies installed (i.e., Oracle) on it and so the job is failing. I'm just looking for the path of least resistance here. My question is there a way to force a timer job to run on the server you want it to? [Edit] If I can do it through code that works for me. I just need to know what the API is to do this if one does exist. I

Debugging Sharepoint timer jobs

倖福魔咒の 提交于 2019-12-03 07:45:18
I am creating my first Timer Job and want to debug it. I have installed the timer job through a feature, and added it to a webapplication's JobDefinitions collection, and added a SPMinuteSchedule to run every 5 minutes (for testing purposes). Then, in Visual Studio I've tried attaching the debugger to the WebApplication's Process, the Central Admin process and the OWSTIMER.exe process, but it will not debug into the Execute Method of the TimerJob. What am I missing here. P.S. The timer job status says succeeded, so it is running. Weird... When I'm debugging TimerJobs I insert a Assertion at