0

Hi i'm new to this please someone help in this. thanks in advance I want to schedule a job for deleting a pod for every 3 days in midnight. Manually script is working fine but scheduling with crontab is not wokring. note:- deployment is statefulset

#!/bin/bash
kubectl delete pod keycloak-server-0

gave permission to execute with chmod +x <sh file name>

scheduling script with cron 00 00 */3 * * <path of the script>

Cyrus
  • 84,225
  • 14
  • 89
  • 153
Nagaraj
  • 31
  • 7

1 Answers1

1

figuredout what i did wrong in scheduling job.

while scheduling we need to specify the **SHELL=/bin/sh** and **PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin** in cron.

Nagaraj
  • 31
  • 7