Why is the timer not calling the function?

I am trying to call a function every 30 seconds. I have used this before without issues so I’m not sure why it isn’t working now. Any ideas? Has something changed in 4.24 maybe?

.h I have tried both public and private

UFUNCTION() void Ping(); 

And the .cpp I see both logs in the output so I know its getting there. Also the ensure passes. I have also tried GetWorld which is null in a UObject and GWorld which also works but has the same problem of the ping function not being called at all.

UE_LOG(LogTemp, Warning, TEXT("start ping")) if (ensure(GEngine)) {     UWorld* World = GEngine->GetWorldContexts()[0].World();     UE_LOG(LogTemp, Warning, TEXT("start ping has gworld"))     World->GetTimerManager().SetTimer(PingTimerHandle, this, &UGameJoltApi::Ping, 30, true, 30); } 

And here is the ping function. Its not called even once. I never see the log in the output.

UE_LOG(LogTemp, Warning, TEXT("ping")) FString Url = URLBaseApi + URLSessions + "ping/?game_id=460364&username=" + Username + "&user_token=" + UserToken;  TSharedRef<IHttpRequest> Request = FHttpModule::Get().CreateRequest(); Request->SetVerb("POST"); Request->SetHeader("Content-Type", "application/json"); Request->SetURL(GenerateUrl(Url)); Request->OnProcessRequestComplete().BindUObject(this, &UGameJoltApi::OnStartSessionResponse); Request->ProcessRequest(); 

c# – Setup specific mousewheel rules and timer with reset function to control a value with minimal user input

My main issue here is to distinguish a first and a second stage when moving a mousewheel up and down.
How could I put the following together for a mousewheel solution in plain c#?
I have a value that controls the opacity level of an object and it could be a value between 1 – 255.
I started with a simple mousewheel setup so that each time the wheel jumps to its next spot upwards or downwards, another value returns a 1 or -1. What I need is moving the wheel up or down 1 time will start a timer event that changes the opacity value to the minimum or maximum value depending on wheel movement direction by adding/subtracting 1 to the current value every 1ms. For up direction, stop value increase only when the wheel was moved to the next spot upwards or when the value is 255. For down direction, stop value decrease only when the wheel was moved to the next spot downwards or when the value is 1.

Expiration Timer Job only does half the job

I have been testing expiration policies on a library.

I put in about 2 dozen documents and then run the expiration timer job in CA.

What I notice is that only half of the documents get processed.

I then run the timer job again and the other half get processed. Is this normal behaviour? Or is there some not so obvious configuration that needs to be set so the timer job has enough juice to finish the job?

To my mind 2 dozen documents doesn’t sound like much.

Create custom timer job which should run only on Application Server running Timer Service

I would like to create a timer job which should run only on Application Server running Timer Service. I am little bit confused after reading couple of blog and came up with construtor based on my understanding.

internal class NewJob : SPJobDefinition {     public const string JOB_NAME = "New Job";      public NewJob()         : base()     {     }      public NewJob(SPWebApplication webApp)         : base(JOB_NAME, SPFarm.Local.TimerService, null, SPJobLockType.Job)     {         Title = string.Format("{0} {1}", JOB_NAME, webApp.DisplayName);     }      public override void Execute(Guid targetInstanceId)     {     } } 

Am I in the right path?

Timer that depends on DeltaTime

I had a question regarding a timer for a grenade I made. The grenade needs to bounce around for 2 seconds and then explode. I guess I want to achieve 2 “ingame seconds”.

This is how I add time to the grenade timer.

m_lifetime += DeltaTime::getDeltaTime(); 

Problem is, in case of fps drop, the physics move slower and the deltatime becomes higher. So with 144fps, the grenade goes much further than at 30fps, because 2 seconds has more “movement”, so to speak. This is my delta timer.

#include "Deltatime.h" #include <chrono> #include <iostream>  std::chrono::duration<float> DeltaTime::m_chrono; std::chrono::time_point<std::chrono::steady_clock> DeltaTime::m_first;  void DeltaTime::init() {     m_first = std::chrono::steady_clock::now(); }  void DeltaTime::update() {     m_chrono = std::chrono::steady_clock::now() - m_first; }  float DeltaTime::getDeltaTime() {     return m_chrono.count(); } 

How can I achieve a grenade that goes the same distance at 30fps as 144fps, or any other difference.

Get SPField real DisplayName in timer job

I wrote two event revicer. On base on Web scope – this frature creat page and shom on them all list field by their display name, user select interesting to him field and can they use in mail template.

foreach (SPField field in list.Fields) {     if ((!field.Hidden && !field.ReadOnlyField && field.Title != "Typ zawartości" && field.Title != "Załączniki") || ((field.Title == "Zmodyfikowane" && !field.Hidden) || (field.Title == "Utworzony" && !field.Hidden) || field.Title == "Utworzony przez" || field.Title == "Zmodyfikowane przez"))     {         if (field.Type == SPFieldType.Boolean || field.Type == SPFieldType.Calculated || field.Type == SPFieldType.Choice || field.Type == SPFieldType.Computed || field.Type == SPFieldType.Currency || field.Type == SPFieldType.MultiChoice || field.Type == SPFieldType.Number || field.Type == SPFieldType.Text || field.Type == SPFieldType.URL || field.Type == SPFieldType.Note)         {             BulletedList1.Items.Add($  "{field.Title} -> [[{field.Title}]]");         }         if (field.Type == SPFieldType.User)         {             BulletedList2.Items.Add($  "{field.Title} -> [[{field.Title}.imie]], [[{field.Title}.imie_nazwisko]]");         }         if (field.Type == SPFieldType.DateTime)         {             BulletedList3.Items.Add($  "{field.Title} -> [[{field.Title}.data]], [[{field.Title}.data_czas]]");         }     } } 

And the second event revicer for WebApplication scope is for job timer. Code read our mail tempale and replace field thier vaule. But the forach on aspx page return fieled by their “translated” display name and the same loop i timer job class retune “no-translated” filen in their original name. For example the default Title or Author, in polish the **Title I chaneged on Adres IP and in polish the Author is Utworzony przez. So for few filed I can do simply replace becasue the Title don’t match the Adres IP.

Dictionary<string, string> fieldsValues = new Dictionary<string, string>(); foreach (SPField f in targetList.Fields) {     if ((!f.Hidden && !f.ReadOnlyField && f.Title != "Typ zawartości" && f.Title != "Załączniki") || ((f.Title == "Zmodyfikowane" && !f.Hidden) || (f.Title == "Utworzony" && !f.Hidden) || f.Title == "Utworzony przez" || f.Title == "Zmodyfikowane przez"))     { ...     } 

So, how i can reach the “translated” display name for field from the place where started the code? I can save somewhere the “no-translated” or static name and my dispaly name tha i can see in aspx pages and them compare by or some anothe way by i prefer get the nam when i looping list.Field.

Timer Jobs not running due to AllowServiceJobs and AllowContentDatabaseJobs being false

After upgrading our farm to SharePoint 2019 I have problems with some timer jobs not running at all. I was able to fix this issue yesterday by following this answer on stackoverflow. However during the night, the settings have been reset to $ false for AllowServiceJobs and AllowContentDatabaseJobs. I wonder why this happens.

My best bet at the moment is that it has to do with the new min role model we introduced with the update. Our farm consists of two “Front-end with Distributed Cache” servers and two “Application with Search”. The timer serice is installed and online on all four servers. AllowServiceJobs and AllowContentDatabaseJobs are true for the application servers and false for the front-ends.

Django / Python – Implement a server-side countdown timer

Im developing a typical Question/Answer game where multiple players can answer the same Question at the same time. They have 10 seconds to choose the right answer.

I need to implement a countdown in the server and when the time is up, all players must know if they choose right or wrong. Then, the game continue with the next Question, restarting the countdown again to 10 seconds. The game finishes when no other Question remains.

The Backend is developed with Django and Django-Rest-Framework exposing a REST API. The Frontend is developed with React consuming the REST API.

I think there probably will be an endpoint where the Frontend (all the Players) ask the Backend the time remaining, but im really lost in how the Backend update that remaining time every second.

Any ideas on how can i aproach this? Thank you!

Can excessive delays in workflows cause SharePoint timer job to be stuck?

One of my workflows has excessive delays and that too of a longer duration. For instance, one delay in my workflow is of three months and other is of a single month. Now the problem is that my SharePoint timer service gets stuck and its status is “Pausing”. Is it possible that the delays in workflows are causing the timer to be stuck? Has this happened to anyone before?

This article suggests that this problem can be caused by a bad workflow instance. Does my workflow come in that category?