The easiest way is to create a text file named /tmp/myfile.sh.cron (name and location are relative and do not matter) with your cron statement in it:
You should always put the full path to the file in the crontab and a shell script as your PATH variable may not be what you think it is. This entry will run the script as you described. Then logged in as the user you wish to run the program as, type:
You can the delete the myfile.sh.cron file. To verify that it read it in, type:
How to make a script run automatically using a cron??
i do not know abt cron......
if i have simple.sh file and i need this to run everyday at a particular time what needs to be done
thanks in advance (4 Replies)
hi ,
i m trying to run bash scrip automaticially but i dont know how i can do this an anybody tell me how i can autorun shell script when i logon .
thanks (9 Replies)
Hi!
I want to run/execute a bash script automatically everytime when a specific file is created or when its timestamp changes. Is this possible? How?
Thank you very much for your answers in advance,
Regards,
Christoph (1 Reply)
Hi All,
I am using ksh as the shell. I have a script that should store variable after executing "onstat" on informix. I can execute it successfully without any issue if run manually, however the value is not showing up when run automatically(scheduled).
Is there anything needed to make the... (1 Reply)
Am new to AIX please help me. I have AIX7 server. When ever the system reboots my script need to run automatically. This will help me to start my application automatically after the server reboot.
Thanks,
Prince Wells (9 Replies)
Hi friends,,,
I am running one server on Ubuntu 12.04 LTS 32-bit, some times my pc restarts automatically, with no reason, I have a script to start server which requires root password. in this directory
/myserver/start_server.sh
How can I do this ?
and some scripts I am having that I... (1 Reply)
Hi ! all, I have once script to remove temporary cache and temporary xml files
looks like this, as it is taking more space, I would like to run automatically every 12 hour once, and then I want to receive some log as acknowledgement
#!/bin/sh
echo "Removing logs and temp files (typically... (4 Replies)
Hello Team .
I am working a health check script ( bash) to run on linux server ( RedHat) and requirements are
1. The o/p of script need to be send to two diff files . I am testing with tee command . But I am not successful yet , any recommendations if that is the right approach ?
2. The same... (2 Replies)