1

I can't get my cron job to appear on Google App Engine under Task Queues > Cron Jobs. I've tried reuploading my app engine and I've followed the two tutorials which use appcfg.sh(this gives an error) and gcloud app deply to upload, found here - https://cloud.google.com/appengine/docs/standard/java/config/cron?hl=en_US&_ga=2.205188432.-1541482127.1505330507, https://cloud.google.com/appengine/docs/flexible/go/scheduling-jobs-with-cron-yaml

When I check the upload logs, it seems like the cron.xml file does upload.

Here's my cron.xml file, placed under webapp/WEB-INF:

    <?xml version="1.0" encoding="UTF-8"?>
<cronentries>
    <cron>
        <url>/hello</url>
        <description>daily update</description>
        <schedule>every day 03:00</schedule>
    </cron>
</cronentries>

I have tried adding a 'target' and tried adding my latest version in there but that doesn't seem to work either

PSLDev
  • 77
  • 6
  • What exact cmds are your trying? – Dan Cornilescu Dec 06 '17 at 14:12
  • Note thant you're mixing references to standard and flexible environment, which could be a problem if you're not aware of it. See https://stackoverflow.com/questions/45842772/how-to-tell-if-a-google-app-engine-documentation-page-applies-to-the-standard-or – Dan Cornilescu Dec 06 '17 at 14:13
  • I'm on standard. Any way to double check? CMDs I'm using are "appcfg.sh -A [projectId] -V [version] update_cron [path to project root]" and "gcloud app deploy cron.xml" inside my WEB-INF folder. – PSLDev Dec 06 '17 at 14:29
  • What error do you get with `appcfg.sh`? By any chance related to the service version? Because the cron config itself is not actually a service config, it doesn't go to a certain service (version). See https://stackoverflow.com/questions/47492050/how-to-cancel-or-stop-google-app-engine-cron-job/47492806#47492806. As for the `gcloud` one - it knows how to deploy `.yaml` files, but I'm unsure if it knows how to deploy `.xml` files. – Dan Cornilescu Dec 06 '17 at 14:53
  • The error I get is "java.utils.prefs.WindowsPreferences - could not open/create prefs root node Software/Javasoft/Prefs at root....". I'm unsure why it's not working through just deploying from Intellij Idea. The logs say it has been uploaded but I see nothing under cron jobs? – PSLDev Dec 06 '17 at 15:03
  • This *might* indicate a problem with Intellij Idea integration. Try running `appcfg.sh` manually instead. – Dan Cornilescu Dec 06 '17 at 15:48
  • Apologies if this is a silly question, but how would I do it manually? I try to open appcfg from my appengine-java-sdk folder, command prompt opens and closes straight away. – PSLDev Dec 06 '17 at 18:19
  • Open the command prompt separately, then type the cmd at the prompt – Dan Cornilescu Dec 06 '17 at 18:27
  • Sorry if it was unclear originally, but that's what I have been doing – PSLDev Dec 06 '17 at 18:36

0 Answers0