Google App Engine for Pseudo-Crown?

I am looking for an opportunity to create pseudo-crowns since I cannot use real jobs on UNIX.

Since Python scripts can run indefinitely, I thought Python would be a great solution.

In the Google App Engine, you can customize Python scripts for free. Therefore, I have to use App Engine.

160,000 external URLs are available on the App Engine (right?), So you should have 160000/31/24/60 = 3.6 accesses per minute.

So my script will be:

import time
import urllib
while time.clock() < 86400:
    # execute pseudo-cronjob file and then wait 60 seconds
    content = urllib.urlopen('http://www.example.org/cronjob_file.php').read()
    time.sleep(60)

Unfortunately, I have no way to test the script, so my questions are: 1) Do you think this will work? 2) Is it allowed (Google TOS) to use the service for this type of activity? 3) Is my calculation correct for urls per minute?

Thanks in advance!

+3
5

, , cron ( Python). - cron.yaml:

cron:
- description: job that runs every minute
  url: /cronjobs/job1
  schedule: every minute

. Google.

+6

Google , .

URLFetch, SDK, 5- -,

20 cron .

+2

, , .

appengine ? .. google?

Google App Engine?

: google cron . :)

: google cron , (.. google-cron Google--, ).

, , , . : http://whatever/mypage.php, ( google ) PHP - .

( , PHP tho - #, PHP)

: ! 6 Dreamhost.com, cron - . PHP, Rails . :) ( ..)

+1

Do what Nick Wise said, or also pass a third-party cronjob using a service like www.guardiano.pm so you can actually call www.yoursite.com/myjob.php and every time you call this URL address, you will execute.

Ps is free. Pss is my favorite project and is in beta.

0
source

Source: https://habr.com/ru/post/1706521/


All Articles