• Resolved wisnuwrdhna

    (@wisnuwrdhna)


    Hello LSCache team support,

    I have problem with cron job to pull image for image optimization.
    I already set auto pull and auto request to on, but nothing happened.
    already check on WP Crontrol and Cron job on cPanel but i don’t know what is wrong.
    already set the cron job to automatically run every 15 minutes.
    honestly I don’t really understand about setting up cron job.
    please help me.
    thank you

    View post on imgur.com

    View post on imgur.com

    View post on imgur.com

    • This topic was modified 4 years, 7 months ago by wisnuwrdhna.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    in this https://imgur.com/rweSfqC

    set commands to wget -q -O - https://yourdomain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

    and you only need one of them , make it 5 minutes or 10 minutes

    Best regards,

    Thread Starter wisnuwrdhna

    (@wisnuwrdhna)

    hi,

    thanks for your reply.
    I don’t really understand what do you mean.
    do you mean set new commands to cron job like this https://imgur.com/ogrxEZ3 ?
    is there something I need to add or edit in my wp-cron.php file?

    Edit: I think the problem is, I dont set any functions to my cron hook. Can you tell me function code to pull image?
    ex/:
    add_action( ‘wpb_custom_cron’, ‘wpb_custom_cron_func’ );

    function wpb_custom_cron_func() {
    wp_mail( ‘[email protected]’, ‘Automatic email’, ‘Automatic scheduled email from WordPress to test cron’);
    }

    • This reply was modified 4 years, 7 months ago by wisnuwrdhna.
    • This reply was modified 4 years, 7 months ago by wisnuwrdhna.
    Thread Starter wisnuwrdhna

    (@wisnuwrdhna)

    new update:

    Cron strangely success to pull the image, but run every 1 or 2 hours although the setting is every 5 minutes.
    I still don’t understand and don’t know what is wrong.
    I don’t even insert any function code yet.
    Can someone please tell me or give me some link to learn about it?

    Thank you in advance

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    yes , the cron is triggered every 5 minutes , but images optimization process may take longer time then 5 minutes

    and you can remove all others , only the last one is needed

    Best regards,

    Thread Starter wisnuwrdhna

    (@wisnuwrdhna)

    hi qtwrk,

    alright then.
    this thread can be closed as solved.
    thank you so much for your help, and have a nice day.

    Plugin Support qtwrk

    (@qtwrk)

    You too ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Problem with cron to pull image’ is closed to new replies.