Reputation: 1777
On AWS I can run cloud formation scripts to do things like shutdown my computers on weekends, or run EMR jobs.
How would I schedule tasks on google without creating a tiny instance as a task manager?
Upvotes: 1
Views: 682
Reputation: 130
method 1:
how to schedule machines to run only at certain time periods pls refer to gcloud compute command start and stop
then crontab -e add following tasks as you expect to be ,for example :
00 06 * * * /usr/bin/gcloud compute instances start instance-1
00 07 * * * /usr/bin/gcloud compute instances stop instance-1
method 2:
suggest you use google container engine
then crontab -e add following tasks as you expect to be ,for example :
00 06 * * * /usr/bin/gcloud compute instance-groups managed resize instance-group-1 --size=1
00 07 * * * /usr/bin/gcloud compute instance-groups managed resize instance-group-1 --size=0
you need to place your task into your vm instance , and create a template instance from the instance you just created, then create an instance group based on that instance template
Upvotes: 2
Reputation: 2629
If I understand you right, App Engine allows you to use Cron Service, which basically can be configured for your purpose. But it requires some knowledge of programming languages like Go, PHP, Java or Python.
Upvotes: 1