kuboard-press icon indicating copy to clipboard operation
kuboard-press copied to clipboard

定时任务时区错误

Open x2584179909 opened this issue 3 years ago • 0 comments

定时任务时区错误

定时任务实际使用中发现时区是西八区,应该改为东八区

kuboard定时设置

image

实际执行

image

kubernetes master节点时区

image

容器日志显示的时间

image

yaml文件

---
apiVersion: batch/v1
kind: CronJob
metadata:
  annotations: {}
  labels:
    k8s.kuboard.cn/name: douyin.shop.info
  name: douyin.shop.info
  namespace: crawler
  resourceVersion: '6214497'
spec:
  concurrencyPolicy: Replace
  failedJobsHistoryLimit: 1
  jobTemplate:
    metadata:
      creationTimestamp: null
      labels:
        k8s.kuboard.cn/name: douyin.shop.info
    spec:
      template:
        metadata:
          creationTimestamp: null
        spec:
          containers:
            - command:
                - ****
              image: '*****'
              imagePullPolicy: Always
              name: spider
              resources: {}
              terminationMessagePath: /dev/termination-log
              terminationMessagePolicy: File
          dnsPolicy: ClusterFirst
          imagePullSecrets:
            - name: huawei
          restartPolicy: Never
          schedulerName: default-scheduler
          securityContext: {}
          terminationGracePeriodSeconds: 30
  schedule: 0 3 * * *
  successfulJobsHistoryLimit: 3
  suspend: false
status:
  active:
    - apiVersion: batch/v1
      kind: Job
      name: douyin.shop.info-27355860
      namespace: crawler
      resourceVersion: '6214496'
      uid: ****
  lastScheduleTime: '2022-01-05T03:00:00Z'
  lastSuccessfulTime: '2022-01-04T03:18:52Z'

x2584179909 avatar Jan 05 '22 03:01 x2584179909