Dear all,

I am so sorry for using a screenshot for my last email. And I'd like to redescribe the problem I have.

I'd like to launch a periodic Ping measurement (with python). 
It starts at UTC-now to (for example) 5 minutes later. I'd like the probe do the Ping test in every 1 minute. Thus I can have 5 results in this measurement.

I am a little confused because all example on documents is one-off. I guess error might happen around "is_oneoff", "interval", "spread".
source code for this test is below and in the attachment.

Could you help me in checking where I get wrong?

Many thanks,
Yihao


----------------------------------------------------------------------------------------------

from datetime import datetime, timedelta
from ripe.atlas.cousteau import (
    Ping,
    AtlasSource,
    AtlasCreateRequest
)

ATLAS_API_KEY = ""

source2 = AtlasSource(
    requested=1,
    type="probes",
    value="35704"
)

ping = Ping(
    af=4,
    target="202.112.51.179",
    description="Test for periodic Ping test",
    packets=1,
)

def request():
    atlas_request = AtlasCreateRequest(
        start_time=datetime.utcnow(),
        stop_time=(datetime.utcnow() + timedelta(minutes=5)),
        key=ATLAS_API_KEY,
        measurements=[ping],
        sources=[source2],
        is_oneoff=False,
        interval=60,
        spread=60
    )
    (is_success, response) = atlas_request.create()
    return is_success, response

if __name__ == '__main__':
    is_success, response = request()