I want to make a cURL request every 12 hours and trigger the request with a cronjob. Unfortunately I'm a total newbie in cURL and cronjobs.
This is the request I want to make:
curl --location --request POST 'https://example.com/wp-admin/admin-ajax.php' \
--form 'action="algolia_re_index"' \
--form 'index_id="searchable_posts"' \
--form 'p="1"'
The request should be triggered by a cronjob via EasyCron. I need to add simple URLs there.
So I tried this:
curl -s "https://example.com/wp-admin/admin-ajax.php' \ --form 'action="algolia_re_index"' \ --form 'index_id="searchable_posts"' \ --form 'p="1"'"
But that's not working.
I don't understand how I add the parameters to the URL. Do I need to add something on my server/site?