0

I'm trying to run cron job in azure cloud shell but it is not working

This is my simple cron job

* * * * *  /home/meet/clouddrive/temp.sh

where

cat /home/meet/clouddrive/temp.sh
#!/bin/bash
echo "meet" >> /home/meet/clouddrive/test.txt
pwd
/home/meet/clouddrive
meet [ ~/clouddrive ]$ ls
temp.sh
meet soni
  • 1
  • 2

1 Answers1

0

I tried to reproduce the same in my environment and got the results like below:

I tried to run Cron job in azure cloud shell like below:

when I try crontab -l there is no job from here.

enter image description here

Then create crontab -e

Run */1 * * * * echo "this is a test" /home/imran123/testfile.txt

Then try to create a file using vi testfile.txt and I mention "This is test"

Then try to give execute permission like below:

chmod +x test.sh

enter image description here

Then when I executed cmd it run successfully like below:

crontab -l
cat testfile.txt

enter image description here

Imran
  • 3,875
  • 2
  • 3
  • 12