Created
January 10, 2017 14:17
-
-
Save TrafeX/f225557cef09dea84547c9c5b6715e55 to your computer and use it in GitHub Desktop.
WordPress Lambda Cronjob
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib2 | |
def lambda_handler(event, context): | |
req = urllib2.Request('https://www.thewebsite.nl/wp/wp-cron.php?doing_wp_cron', headers={'User-Agent' : "AWS Lambda Cron"}) | |
con = urllib2.urlopen(req) | |
print con.read() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
[ERROR] Runtime.UserCodeSyntaxError: Syntax error in module 'lambda_function': invalid syntax (lambda_function.py, line 6)
Traceback (most recent call last):
File "/var/task/lambda_function.py" Line 6
print con.read()