Looking for some guidance around setting up a cron job to run every 15 minutes that sets off a script within the WordPress Plugin Amelia. According to their docs, I need to add the following line to the Cron file:

*/15 * * * * https://domain.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/notifications/scheduled/send

Now as I'm using CPanel I set up the cronjob using the gui so it looks something like this. Swapping https://domain.com for the actual domain.: enter image description here

I've added quotes to the command as I was getting errors because it was splitting the command when reaching an & but I am still getting an error saying the directory is not found.

Any help would be great. Thank you in advance.

  • 4
    An URL is not a command. Did you mean to call curl with this URL?
    – Kusalananda
    Jun 7 '20 at 10:34
  • @Kusalananda not 100% sure as I'm trying to follow the documentation set out by the API. They mention no use of Curl. However willing to give it a try. I have tried wget -q -O - https://mydomian.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/notifications/scheduled/send but no luck. Jun 7 '20 at 11:35
  • 1
    your wget command is without "added quotes to the command as I was getting errors"
    – pLumo
    Jun 7 '20 at 12:15
  • Explain exactly what you wan the cron job to do. Jun 7 '20 at 13:49

Can you try updating the command section to

GET 'https://domain.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/notifications/scheduled/send' > /dev/null

You can try running the same command without > /dev/null , if the shell access is available.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.