هنوز چند بایت مونده که پیدا کنم...

اجرای منظم یک API در فواضل زمانی قابل تنظیم

Calling a web api in certain time slice

What is this!

This is a tiny Windows Service to Call a Web API in a specific time slice.

How to Configure

  1. Open MalekMakan.ApiCallerService.exe.config file

  2. There are three keys in appSettings section (node)

    • Interval: in milliseconds. This is what telling the how frequent call the service. By default, it is 1 min (6000 ms).
    • BaseAddress: Define base url or api here.
      • Example: http://jsonplaceholder.typicode.com/
    • Rout: this rout will be added to base address and they both show the api URL together.
      • Example: posts
    • Please keep in mind that the calling api must be GET type!
    • You May include your parameter(s) in the Rout.
  3. Save and Close.

How to Install

  1. Run Command Prompt as Administrator.

  2. Change directory to %SystemDrive%\Windows\Microsoft.NET\Framework\v4.0.30319

  3. Run installutil.exe to install the service: installutil.exe ExtractionPath\MalekMakan.ApiCallerService.exe

     something like this:
     c:\Windows\Microsoft.NET\Framework\v4.0.30319>installutil.exe c:\MACService\MalekMakan.ApiCallerService.exe
    
  4. Punch down this command and try to Start Service: net start MalekMakanApiCallerService

     Like this:
     c:\Windows\Microsoft.NET\Framework\v4.0.30319>net start MalekMakanApiCallerService
    

What else

  1. Enjoy that.
  2. Send any feedback via mohammad@malekmakan.com, or visit me at my personal website.
  3. Check my tech. updates on CodeGeek.ir.

Cheers

Download

نویسنده : محمد ملک مکان
یکشنبه 3 مرداد 1395
+ 200 -

ایده ها، نظرات و سوالات دوستان ما

محمد
یکشنبه 3 مرداد 1395
یه سرویس ویندوزی سبک و جمع جور برای فراخوانی یک وب ای پی آی در فواصل زمانی مشخص.
+ 80 -

خوشحال میشیم نظرتُ بدونیم