I am trying the example given here. It uses google app engine, cloud engine and the pub/sub service to execute cron tasks on the GCE. It fairly simple to understand and execute. However I tried replacing the logger_sample_task.py code with my own code (give below). All it does is log a string to a log file. Note: The script runs on Google compute engine
import logging
logging.basicConfig(filename='testlog.log', level=logging.INFO)
logging.info('Hope this works')
However after the setup when I check if the cron task was run , the cron service has a status failed.
I followed all the steps exactly as given (both with and without my custon script) but it still says cron job failed. Any reasons or ways to find out the reason for this failure?
App engine has this error in its log:
https://pubsub.googleapis.com/v1beta2/projects/dummy-project-1082/topics/test:publish?alt=json returned "One or more messages in the publish request is empty. Each message must contain either non-empty data, or at least one attribute.">
Update: Got rid of the app engine error by following the suggestions in this post