How to do something at some specified time
Unsolved
General and Desktop
-
Hi,
If you're on Linux then use a cron job to call your application/script/whatever you need.
-
like 2/15/2017 10:30:00
int msecTo(const QDateTime& fromdt,const QDateTime& todt){ return fromdt.time().mSecTo(todt.time())+( fromdt.date().daysTo(todt.date())*24*60*60*1000 ); } const QDateTime target(QDate(2017,2,15),QTime(10,30,0)); QTimer::singleShot(msecTo(QDateTime::currentDateTime(),target),[]()->void{qDebug("2/15/2017 10:30:00 and all's well!");});