LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Cron Job Help (https://www.linuxquestions.org/questions/programming-9/cron-job-help-679040/)

grande25 10-30-2008 03:58 PM

Is there an easier way? I don't even know anything about this and now I'm creating partiions? How do I make cron work? Why does it insist on deleting my edits after reboot? where is the easy button? jeeeeeezzz

grande25 10-30-2008 04:53 PM

Okay, so the problem is that I have my cron program running from a tmpfs so when I reboot it wipes whatever I had saved in when i used crontab -e. That completely defeats the purpose of even having Cron.

How do I get my cron running so that it saves the info from crontab -e so that it will always run what i want it to? Do i have to partition? How do i do that?

grande25 10-30-2008 05:12 PM

Okay, When I run crond from root it runs the /etc/cron.d/mycronfile

Now how do i make it do this without having to type "crond" ??

chrism01 10-30-2008 06:16 PM

Obviously a tmpfs is temporary, so it will get wiped.
That's normally just used for txfrs etc.
The crond daemon is normally started a boot as part of the boot process. Its always running on a normal system.

grande25 10-30-2008 10:27 PM

Quote:

Originally Posted by chrism01 (Post 3326642)
Obviously a tmpfs is temporary, so it will get wiped.
That's normally just used for txfrs etc.
The crond daemon is normally started a boot as part of the boot process. Its always running on a normal system.

When I do ps -ef | fgrep crond I get this:

root 1851 1831 0 22:20 ttyp0 00:00:00 fgrep crond

when I do crond and ps -ef | fgrep crond I get this

root 1855 1 0 22:23 ? 00:00:00 crond
root 1857 1831 0 22:23 ttyp0 00:00:00 fgrep crond


Also, when I run crond it will run a cron file that I have saved to my /etc/cron.d

Any ideas? Why isn't crond running by itself without me telling it with a "crond" at the root?

I do have a /etc/rc.d/crond file that is run from the rc.conf file at startup... I'll post that script tomorrow when I get some more time.

thanks..

grande25 11-02-2008 12:42 AM

I ended up finding a file called /etc/conf/S80local.sh and when I looked in that file it said, "##this file will be run at the end of boot".

So I entered "/etc/rc.d/crond start" in the first line after the "##this file..."

And now it does what I want it to. Starts cron after bootup and runs the script I need it to run every few minutes or so.

I'm so happy :)


All times are GMT -5. The time now is 05:12 PM.