質問編集履歴

1

質問内容更新

2018/12/27 03:17

投稿

raccoondog
raccoondog

スコア77

test CHANGED
@@ -1 +1 @@
1
- GAEのcron定義について
1
+ 〖再掲〗GAEのcron定義について
test CHANGED
@@ -1,15 +1,9 @@
1
1
  特定のSQLをGAEのcronで定期実行させたいのですが、cron定義デプロイ時にエラーが出力されます
2
2
 
3
-
4
-
5
3
  初回はデプロイ成功したのですが定義に不足があるため、SQLの実行は失敗
6
4
 
7
-
8
-
9
5
  cronの定義を見直して修正と再デプロイを試みた結果、デプロイ失敗
10
6
 
11
-
12
-
13
7
  cronの定義を元に戻してから、再デプロイをするも失敗している状況です
14
8
 
15
9
 
@@ -68,8 +62,150 @@
68
62
 
69
63
  commit;
70
64
 
71
-
72
-
73
-
74
-
75
- ```
65
+ ```
66
+
67
+
68
+
69
+ ※2018/12/26
70
+
71
+ GAEのcloud shellからcrontablを使って、定義する方法を試しました。
72
+
73
+ 実行されているか不明の状況です。
74
+
75
+
76
+
77
+ ```
78
+
79
+ ※※シスログ※※
80
+
81
+ dwhtest01@cloudshell:/var/log (fluid-emissary-216806)$ cat syslog | grep cron
82
+
83
+ Dec 27 09:36:52 cs-6000-devshell-vm-b7ca3c5c-6e14-4b8f-91c9-233241f099b9 crontab[370]: (dwhtest01) BEGIN EDIT (dwhtest01)
84
+
85
+ Dec 27 09:37:04 cs-6000-devshell-vm-b7ca3c5c-6e14-4b8f-91c9-233241f099b9 crontab[370]: (dwhtest01) END EDIT (dwhtest01)
86
+
87
+ Dec 27 09:37:10 cs-6000-devshell-vm-b7ca3c5c-6e14-4b8f-91c9-233241f099b9 crontab[389]: (dwhtest01) BEGIN EDIT (dwhtest01)
88
+
89
+ Dec 27 09:45:27 cs-6000-devshell-vm-b7ca3c5c-6e14-4b8f-91c9-233241f099b9 crontab[389]: (dwhtest01) END EDIT (dwhtest01)
90
+
91
+ Dec 27 09:46:10 cs-6000-devshell-vm-b7ca3c5c-6e14-4b8f-91c9-233241f099b9 crontab[450]: (dwhtest01) LIST (dwhtest01)
92
+
93
+ Dec 27 09:46:13 cs-6000-devshell-vm-b7ca3c5c-6e14-4b8f-91c9-233241f099b9 crontab[457]: (dwhtest01) BEGIN EDIT (dwhtest01)
94
+
95
+ Dec 27 11:11:13 cs-6000-devshell-vm-b7ca3c5c-6e14-4b8f-91c9-233241f099b9 crontab[457]: (dwhtest01) REPLACE (dwhtest01)
96
+
97
+ Dec 27 11:11:13 cs-6000-devshell-vm-b7ca3c5c-6e14-4b8f-91c9-233241f099b9 crontab[457]: (dwhtest01) END EDIT (dwhtest01)
98
+
99
+ Dec 27 11:11:20 cs-6000-devshell-vm-b7ca3c5c-6e14-4b8f-91c9-233241f099b9 crontab[518]: (dwhtest01) LIST (dwhtest01)
100
+
101
+ Dec 27 11:50:25 cs-6000-devshell-vm-b7ca3c5c-6e14-4b8f-91c9-233241f099b9 cron[1089]: (CRON) DEATH (can't open or create /var/run/crond.pid: Permission denied)
102
+
103
+ Dec 27 11:50:35 cs-6000-devshell-vm-b7ca3c5c-6e14-4b8f-91c9-233241f099b9 cron[1134]: (CRON) INFO (pidfile fd = 3)
104
+
105
+ Dec 27 11:50:35 cs-6000-devshell-vm-b7ca3c5c-6e14-4b8f-91c9-233241f099b9 cron[1135]: (CRON) STARTUP (fork ok)
106
+
107
+ Dec 27 11:50:35 cs-6000-devshell-vm-b7ca3c5c-6e14-4b8f-91c9-233241f099b9 cron[1135]: (CRON) INFO (Running @reboot jobs)
108
+
109
+ dwhtest01@cloudshell:/var/log (fluid-emissary-216806)$
110
+
111
+
112
+
113
+
114
+
115
+ ※※サービス状態※※
116
+
117
+ dwhtest01@cloudshell:/var/log (fluid-emissary-216806)$ service --status-all
118
+
119
+ [ - ] apparmor
120
+
121
+ [ + ] cgroupfs-mount
122
+
123
+ [ + ] cron
124
+
125
+ [ + ] docker
126
+
127
+ [ ? ] hwclock.sh
128
+
129
+ [ ? ] kmod
130
+
131
+ [ ? ] lxc
132
+
133
+ [ ? ] lxc-net
134
+
135
+ [ - ] postgresql
136
+
137
+ [ - ] procps
138
+
139
+ [ + ] rsyslog
140
+
141
+ [ + ] ssh
142
+
143
+ [ - ] sudo
144
+
145
+ [ - ] supervisor
146
+
147
+ [ + ] udev
148
+
149
+ [ - ] x11-common
150
+
151
+ dwhtest01@cloudshell:/var/log (fluid-emissary-216806)$
152
+
153
+
154
+
155
+
156
+
157
+ ※※クーロン定義※※
158
+
159
+
160
+
161
+ dwhtest01@cloudshell:/var/log (fluid-emissary-216806)$ crontab -l
162
+
163
+ # Edit this file to introduce tasks to be run by cron.
164
+
165
+ #
166
+
167
+ # Each task to run has to be defined through a single line
168
+
169
+ # indicating with different fields when the task will be run
170
+
171
+ # and what command to run for the task
172
+
173
+ #
174
+
175
+ # To define the time you can provide concrete values for
176
+
177
+ # minute (m), hour (h), day of month (dom), month (mon),
178
+
179
+ # and day of week (dow) or use '*' in these fields (for 'any').#
180
+
181
+ # Notice that tasks will be started based on the cron's system
182
+
183
+ # daemon's notion of time and timezones.
184
+
185
+ #
186
+
187
+ # Output of the crontab jobs (including errors) is sent through
188
+
189
+ # email to the user the crontab file belongs to (unless redirected).
190
+
191
+ #
192
+
193
+ # For example, you can run a backup of all your user accounts
194
+
195
+ # at 5 a.m every week with:
196
+
197
+ # 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
198
+
199
+ #
200
+
201
+ # For more information see the manual pages of crontab(5) and cron(8)
202
+
203
+ #
204
+
205
+ # m h dom mon dow command
206
+
207
+ 0 1 * * * /home/dwhtest01/cron/bigquery_tbl_gousei.sql
208
+
209
+ dwhtest01@cloudshell:/var/log (fluid-emissary-216806)$
210
+
211
+ ```