0

I want to schedule a CRON job into AWS Ubuntu instance. I have a simple cron sample like the following:

import pandas as greatPanda
import pprint
import uuid

df = greatPanda.read_csv('/home/soumik/appTornado/di/ABP/df.csv')

pprint.pprint(df)
name = '/home/soumik/appTornado/di/ABP/df_'+str(uuid.uuid4())+'.csv'
df.to_csv(name,index=False)

And I have set the CRON like the following with crontab -e into terminal:

*/1 * * * * python /home/ubuntu/ABP/abp_backend_processing/cronSample.py > /home/ubuntu/ABP/abp_backend_processing/cronlog.txt

The sample code has been run into my local machine with proper CRON functionality but can not find any luck into AWS instance.

1

2 Answers 2

0

To set up the cronjob for the user you have logged in for follow this steps

  1. log into the ssh console
  2. Open the crontab file by typing crontab -e
  3. close the file with changes you want to make. In your case the syntax is right.
  4. Once you close the file you can see that 'new crontab is installing' message you are done.
0

I think your Cron service not started. Try:

service crond start

You can check Cron service status with:

service crond status

Make sure your script file has execute permission.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .