Title: wpcron executed manually give syntax error
Last modified: October 29, 2020

---

# wpcron executed manually give syntax error

 *  Resolved [wojtek1904](https://wordpress.org/support/users/wojtek1904/)
 * (@wojtek1904)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/wpcron-executed-manually-give-syntax-error/)
 * Hey, so I have a site with woocommerce and wpcron jobs not wroking properly so
   I wanted to execute it manually from hosting dashboard. I read that I should 
   just execute wp-cron.php, but I got errors when tried do this.
 * This is the error:
    `Parse error: syntax error, unexpected ':', expecting '{'
   in /home/veritas/domains/mydomain.pl/public_html/wp-content/plugins/woocommerce/
   woocommerce.php on line 56`
 * The line when error appear:
 *     ```
       function wc_get_container() : \Psr\Container\ContainerInterface {
       	return $GLOBALS['wc_container'];
       }
       ```
   
 * I tried to find solution in google, but all I found was to change php version,
   so I did it – changed to latest php version, but it didnt helped.
 * I will appreciate any help 🙂
    -  This topic was modified 5 years, 8 months ago by [wojtek1904](https://wordpress.org/support/users/wojtek1904/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Support [mouli a11n](https://wordpress.org/support/users/mouli/)
 * (@mouli)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/wpcron-executed-manually-give-syntax-error/#post-13622732)
 * Hi [@wojtek1904](https://wordpress.org/support/users/wojtek1904/)
    If you are
   trying to set up a remote cron job, the line to execute need to look something
   like this: `wget -q -O - http://yourdomain.com/wp-cron.php?doing_wp_cron >/dev/
   null 2>&1`
 * You can read more about this here:
    - [https://wpbeaches.com/set-up-wordpress-wp-cron-php-to-run-manually/](https://wpbeaches.com/set-up-wordpress-wp-cron-php-to-run-manually/)
    - [https://www.hostgator.com/help/article/how-to-replace-wordpress-cron-with-a-real-cron-job](https://www.hostgator.com/help/article/how-to-replace-wordpress-cron-with-a-real-cron-job)
 * I hope that helps you to figure it out.
    Feel free to get back to us if you have
   further questions.
 *  Plugin Support [Damianne P (a11n)](https://wordpress.org/support/users/drwpcom/)
 * (@drwpcom)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/wpcron-executed-manually-give-syntax-error/#post-13678350)
 * Hi [@wojtek1904](https://wordpress.org/support/users/wojtek1904/). We haven’t
   heard from you in a while so I’m going to go ahead and mark this thread as resolved.
   If you still need help with this issue or have any other questions about the 
   WooCommerce plugin, please start a new thread.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘wpcron executed manually give syntax error’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [wocommerce](https://wordpress.org/support/topic-tag/wocommerce/)

 * 2 replies
 * 3 participants
 * Last reply from: [Damianne P (a11n)](https://wordpress.org/support/users/drwpcom/)
 * Last activity: [5 years, 7 months ago](https://wordpress.org/support/topic/wpcron-executed-manually-give-syntax-error/#post-13678350)
 * Status: resolved