0
Answered
trustyao 4 months ago in Scrapy Cloud • updated 4 months ago 3

I have read this topic. https://support.scrapinghub.com/topics/708-api-for-periodic-jobs/

But when I run this in command lines, it returns some errors. Now how to use it? Thanks

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


E:\QA>curl -X POST -u ffffffffffffffffffffffffffffffff: "http://dash.scrapinghub.com/api/periodic_jobs?project=111111" -d '{"hour": "0", "minutes_shift": "0", "month": "*", "spiders": [{"priority": "2", "args": {}, "name": "myspider"}], "day": "*"}'

{"status": "badrequest", "message": "No JSON object could be decoded"}curl: (6)
Could not resolve host: 0,
curl: (6) Could not resolve host: minutes_shift
curl: (6) Could not resolve host: 0,
curl: (6) Could not resolve host: month
curl: (6) Could not resolve host: *,
curl: (6) Could not resolve host: spiders
curl: (3) [globbing] bad range specification in column 2
curl: (6) Could not resolve host: 2,
curl: (6) Could not resolve host: args
curl: (3) [globbing] empty string within braces in column 2
curl: (6) Could not resolve host: name
curl: (3) [globbing] unmatched close brace/bracket in column 12
curl: (6) Could not resolve host: day

curl: (3) [globbing] unmatched close brace/bracket in column 2

Answer

Answer
Answered

Hi Trustyao,

To set periodic jobs [officially supported] please check this article:
http://help.scrapinghub.com/scrapy-cloud/periodic-jobs

Kind regards,

Pablo

Answer
Answered

Hi Trustyao,

To set periodic jobs [officially supported] please check this article:
http://help.scrapinghub.com/scrapy-cloud/periodic-jobs

Kind regards,

Pablo

According to this article, I have to set up my periodic jobs one by one. But I need to set up many periodic jobs. So I need some methods which can batch set up. Is this API for periodic jobs still on working? Thanks.

I know how to set periodic jobs [officially supported]. But is there any api for setting periodic jobs? If not, please give me a reply then I would set the periodic jobs one by one. Thanks