1

I want to run a background scheduler in my web application. This scheduler will check the current time and if it matches with the programmed time then it sends a E-mail. How can i create background Scheduler ?

Zala Krunal
  • 315
  • 1
  • 3
  • 17

2 Answers2

3

It depends if you want to run a script in background via command line, than you can use exec command: exec

Or if you want to start another thread, than you can use pthreads

If you want to have a job that executes at a certain time or in certain intervals, you can set up a cronjob. This tutorial is very helpful, and if you are on linux you can look at this documentation.

bpoiss
  • 13,673
  • 3
  • 35
  • 49
2

You need to setup cron job. You may find more information a link!

Qammar Feroz
  • 708
  • 8
  • 21