Is there a way by which i can control,that is schedule, run or pause the adwords Script using Adwords API.
My requirement is that i want to run some task through adwords API and want to make sure that whenever my task is running adwords script should not make any change. And as soon as the task is over (which may take days), i want to resume the script.
Currently i am maintaining this by disabling the script manually before running and i want to automate this that is disable script for account before running and resuming it as the task completes.
UPDATE:
I would also like to do the same thing for automated rules.
you could do this through the Google Spreadsheet API:
Create an spreadsheet
When the AdWords API is running, it can write "running" in cell A1
When the AdWords API finishes running, it can delete this value
And at AdWords Script side:
- When the AdWords Script starts running, it can read this cell, and stop running IF value in cell A1 is "running".
Hope you find it useful
You can't schedule scripts / rules with AdWords API.
One thing you could do for Scripts though - put a file in Google Drive that'll serve as a lock:
BIG_TASK {
Drive.putFile("lock")
doThings();
Drive.removeFile("lock")
}
SCRIPT {
if (Drive.fileExists("lock")) {
return;
}
doOtherThings();
}
No easy answer for rules though.
Related
I uploaded the file to asana and I have its gid. The file is quite large and I don't want to spend traffic and server resources for the script to work so that this file is added to all the tasks I need.
I tried to make updates and history through tasks, but there are no visible changes. The API documentation does not provide for such a method either, but perhaps someone will advise a working solution.
I'd like to run a Python script in the cloud. It would use Tweepy Streaming to continuously listen for Tweets containing certain keywords. So it needs to run uninterrupted, 24/7.
Would Google Cloud Run be suitable for this use case?
The Quotas and Limits page mentions that requests timeout after 60 minutes max, but I don't know exactly what this means.
Thank you.
No, it would not be a good choice. Serverless infrastructure provided by products like Cloud Run and Cloud Functions is generally assumed to expand and contract server instances on demand, and server instances are never guaranteed a long uptime. If you absolutely require 24/7 uninterrupted operation of some background task not tied to an event or HTTP request, you should use a different cloud product, such as App Engine or Compute Engine.
"some background task not tied to an event or HTTP request"
Isn't what the OP wants? Merely to listen for tweets 24/7? Detecting a tweet is an event and an HTTP request. Cloud Run and Cloud Functions can be triggered 24/7 via its URL endpoints.
In the Cloud Functions Page, if you scroll down there is a section called "Integration with third-party services and APIs".
I quote this section:
"... capabilities such as sending a confirmation email after a successful Stripe payment or responding to Twilio text message events"
listening for tweets counts too. So it seems Google Cloud Functions/ Cloud Run can be used for the OP's use case.
I'll start this by saying I'm new to using Google Cloud Tasks, so please forgive me if this is an obvious issue.
I've created a new Cloud Task queue using gcloud with the command:
gcloud tasks queues create default
I've then proceeded to add tasks to the queue from a Ruby on Rails applciation, and from the command-line using this command:
gcloud tasks create-http-task --queue=default --url=https://google.com --method GET
I then see the tasks being added to the queue, but the HTTP requests are never made. As well the queue itself says that there's no "Tasks In Queue" even though the ones I've made are listed in the tasks list right below this message:
I've enabled logging with:
gcloud tasks queues update default --log-sampling-ratio=1.0
and can see the tasks being created in the logs, but there are no logs for the individual tasks.
The Cloud Run service I'm invoking has been made publicly accessible, and if I manaully POST the task payload to the url in the task it works. I'm using GET google.com as I assume it's reliably accessible.
Is anyone able to tell me what I'm doing wrong? This is the last item I need to sort to wrap up our projects move to Google Cloud! Thank-you!
In case anyone else runs upon this, there's one more trick to enabling Google Cloud Tasks.
After making sure that App Engine is setup on your project, you also need to make sure that the application itself has not been disabled! It turns out the project I was on was using App Engine many years ago and the only application was disabled in the App Engine settings. Enabling this again made everything work as you'd expect.
You can find the setting by going to "App Engine", "Settings", then checking the "Disable Application" setting.
Good-luck to anyone reading this!
We have a drawing creation task that we'd like to offload to the design automation API. Every time the task runs, it will need as input a bunch of data that will affect what it creates in the DWG. What's the best way to make this job-specific data available to each job? In our case if we could include a text file that might be 1mb in size, that would work fine.
I have looked at the API documentation and other than the zip package, I don't see a way to accomplish this other than attempting to have our automation make outbound web service calls when it runs which i'm not sure would be allowed on the remote server.
You should be able to create a custom App package with a job that accepts your custom data has input argument, take a look at those demos:
design.automation-.net-input.output.sample
design.automation-.net-custom.activity.sample
You can also have your own web service that returns the needed payload, it is possible to issue an http call from an activity, see following sample for a demo:
https://github.com/szilvaa/variadic
Hope that helps
from what I understood Cloud Code is like a server, we can declare functions (only javascript?) to make app running lighter. Should I put every query on Cloud Code instead of iOS app?
You don't have to put every query on Cloud Code but you can use it to host functions that should rest in a sever or you would like to change without requiring a app update.
As a quick example, you can create a function in cloud code to send a mail to a user friend, calculate some number with a variable that you don't know and want to change from time to time, or make some safety check with other servers before a payment.